A
Anja
Hey everyone,
I have a drop down combo box that gets its data from a query. It has
an ID field which is also the value field (and is hidden) and first
and last name fields.
So, the query looks like:
SELECT Persons_T.ID, Persons_T.[First Name], Persons_T.[Last Name]
FROM Persons_T ORDER BY [Last Name];
So, what I am trying to do is select an item programatically using
VBA. So, I get an ID and based on this ID value, I want to select the
value in the combo field.
I tried something like:
MyCombo.Value = ID. However, that does not seem to work. Do I have to
loop over all the combo list values and compare the Value field and
then set the selected value or is there a better way to do it?
Thanks for any help you might be able t give me.
Best,
Anja
I have a drop down combo box that gets its data from a query. It has
an ID field which is also the value field (and is hidden) and first
and last name fields.
So, the query looks like:
SELECT Persons_T.ID, Persons_T.[First Name], Persons_T.[Last Name]
FROM Persons_T ORDER BY [Last Name];
So, what I am trying to do is select an item programatically using
VBA. So, I get an ID and based on this ID value, I want to select the
value in the combo field.
I tried something like:
MyCombo.Value = ID. However, that does not seem to work. Do I have to
loop over all the combo list values and compare the Value field and
then set the selected value or is there a better way to do it?
Thanks for any help you might be able t give me.
Best,
Anja