G
Guest
I have a listbox on a form. A textbox checks the content of the listbox and
returns two messages according to what is found. I'd like the message to
visible immediately on opening the form. I tried setting a step in an event
procedure on the form's On Open property. The event does a couple other
things: pops up a message box warning, and opens an append query. I added the
line Me.listbox.SetFocus. Now, that doesn't seem to be enough. When I open
the form, the listbox does appear to get the focus, but the message in the
textbox does not become visible until I actually click on the listbox.
Actually, the visible information in the listbox should result in exactly the
opposite messsage that is visible in the textbox, until I click in the
listbox. I notice that the list box then becomes highlighted (the background
and font colors "invert"?)...and no matter what else I click on it remains
that way.
Am I going about this all wrong? My listbox gets data from a query. My
textbox is supposed to display a message if the listbox is null, and the
value of the listbox in another message if there is a value (there are only
two options - a specific value or null). I'd like to hide the listbox and
just display the two optional messages.
returns two messages according to what is found. I'd like the message to
visible immediately on opening the form. I tried setting a step in an event
procedure on the form's On Open property. The event does a couple other
things: pops up a message box warning, and opens an append query. I added the
line Me.listbox.SetFocus. Now, that doesn't seem to be enough. When I open
the form, the listbox does appear to get the focus, but the message in the
textbox does not become visible until I actually click on the listbox.
Actually, the visible information in the listbox should result in exactly the
opposite messsage that is visible in the textbox, until I click in the
listbox. I notice that the list box then becomes highlighted (the background
and font colors "invert"?)...and no matter what else I click on it remains
that way.
Am I going about this all wrong? My listbox gets data from a query. My
textbox is supposed to display a message if the listbox is null, and the
value of the listbox in another message if there is a value (there are only
two options - a specific value or null). I'd like to hide the listbox and
just display the two optional messages.