NashVegas
asked on
VBA updates combobox value but it is not displaying on form
I have a combo box called "location" on a form with the following row source:
SELECT rmLevel.ID, rmLevel.fclty & ': ' & rmLevel.room AS Location FROM rmLevel INNER JOIN tempLoc ON rmLevel.ID=tempLoc.locID ORDER BY rmLevel.fclty, rmLevel.room;
I have a before update event that executes when a different field on the form is input. When the code executes, it assigns a value to the location combo box. The value seems to get set correctly, but the location does not display. For example, if I select the location "Fclty1: Rm6" and then check the value of the location combo box, I see that the value is 26 (the ID associated with that particular location). However if I use VBA to update the value of the location combo box to 26, the field is still blank after the update (even though I can test the value and see that it has been set to 26). What am I missing?
SELECT rmLevel.ID, rmLevel.fclty & ': ' & rmLevel.room AS Location FROM rmLevel INNER JOIN tempLoc ON rmLevel.ID=tempLoc.locID ORDER BY rmLevel.fclty, rmLevel.room;
I have a before update event that executes when a different field on the form is input. When the code executes, it assigns a value to the location combo box. The value seems to get set correctly, but the location does not display. For example, if I select the location "Fclty1: Rm6" and then check the value of the location combo box, I see that the value is 26 (the ID associated with that particular location). However if I use VBA to update the value of the location combo box to 26, the field is still blank after the update (even though I can test the value and see that it has been set to 26). What am I missing?
ASKER
Yes
can you upload ... and describe the steps to reproduce issue ?
mx
mx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Never a waste of time ... no worries.
take care ...
mx
take care ...
mx
ASKER
I realized the mistake I had made on my own.
mx