C
Craig
I'm using Access 2K. I have 2 listboxes on a form and I
want the first record in each listbox to be highlighted
(default) when the user opens the form.
The code I have in the 'on open' event for the form is the
following:
Me!Listbox1Name.Value = Me!Listbox1Name.ItemData(0)
Me!Listbox2Name.Value = Me!Listbox2Name.ItemData(0).
The problem I have is that this works only for Listbox1.
The first record in Listbox2 does not highlight. Could
this be because of the underlying recordsource query?
FYI: The query for Listbox1 is a simple query of 2 fields
from a table. The query for Listbox2 is a Union query of
two fields from 2 different tables.
Why should it matter? Not to be funny or anything, but
the first record in a listbox is the first record in a
listbox.
Thx for any and all help.
C
want the first record in each listbox to be highlighted
(default) when the user opens the form.
The code I have in the 'on open' event for the form is the
following:
Me!Listbox1Name.Value = Me!Listbox1Name.ItemData(0)
Me!Listbox2Name.Value = Me!Listbox2Name.ItemData(0).
The problem I have is that this works only for Listbox1.
The first record in Listbox2 does not highlight. Could
this be because of the underlying recordsource query?
FYI: The query for Listbox1 is a simple query of 2 fields
from a table. The query for Listbox2 is a Union query of
two fields from 2 different tables.
Why should it matter? Not to be funny or anything, but
the first record in a listbox is the first record in a
listbox.
Thx for any and all help.
C