Access JumpStart 2.0 | Blog

A Rapid Development Framework for Microsoft Access

I have been slack in writing for the past week. The main obstacle is that I had a great suggestion about writing more to my target market in terms of Access JumpStart. This turned out to be a big pivot in my thought process, and I’m not sure I’m there yet.

Daily writing is important for me because it helps me hone my skills both at writing and coding, and it provides contact with others who are interested in what I’m doing. This contact can organically provide different opportunities to work with you as a reader of this email list and bounce ideas off of you.

There has definitely been a resistance in my desire to write after I missed a week of writing, but I am handling this now by getting back on the horse. No more procrastinating, Here I am, back in your email inbox.

On a different note, I had an issue the other day with controls in a form layout. Sometimes it’s easier to use that “Arrange” functionality in Access to easily set up table like layouts. They were introduced in Access 2007 and works in terms of columns and rows. The widths and heights of rows and columns can be set to be static or grow or shrink as the form size changes.

It reminds me of the early days of the internet when I built a lot of tables in HTML as the main formatting tool. This was when CSS was in it’s infancy and tables were rendered similarly in the main browsers of the day, Firefox, Netscape, and Internet Explorer! I think I might be exposing my age here.

Anyway, I have used layouts for organizing and structuring menus at times in Access applications. The particular configuration I used was originally built in a stacked layout vs a tabular layout. I’m not sure if that made a difference, but I suspect it might.

In my layout I have multiple columns of multiple buttons with labels dispersed throughout to group the buttons in various ways. The issue I had was that some of my labels were inexplicably disappearing when I went into Form View from Design View. I had not attached the labels to anything so I thought they were independent, however, I noticed that some of them had moved as well.

I carefully put everything back, multiple times, sometimes even completely recreating the labels. I studiously checked the properties of the label while in Form View using the Immediate panel in the VBE editor. The visibility propery was always set to True.

I’m not sure what exactly the breakthrough was, but eventually I figured out that when I moved a button to the right of a label that was formerly unattached to anything, Access automatically paired the button and the label. There is no property on the label in design view and so no way to see this, and no way to change it either. At least none that I could find.

So when the button and label are paired, if you hide the button, the label automatically hides with it. So when I was hiding certain buttons to create empty spaces, the label was hidden as well. I did not want the label to be attached to the control.

I did not try to programatically change this in VBA, and that could be possible, but since in this case for this app the button would always be hidden, it’s format / positioning didn’t really matter. So what I did was just split the layout cell horizontally to put an empty cell between the button and the label. This allowed me to break the relationship by moving the button out of the layout, to another section and then back into the layout with no button directly to the right.

Bottom line, be careful with strange layout behavior. The more basic your layout, the less likely you are to have issues like this. I like the layout feature, but sometimes it’s just easier to use some sort of form resizing routine (like in Access JumpStart) and a free form layout.