Setting the value in a combobox at Load

G

Guest

I am trying to prepopulate the value in a combo box during the Load event if the related records already have a value assigned. The example would be a room choice. The reservation has already been entered and the room choice has been set. The agent returns to the record and I want the room choice combo box to match the record accessed. The record will be in a subform but the field that ties both the form and subform is available from either. I have specified a query to get the information, I am having trouble getting the recordset open command to work.
 
C

ChrisJ

If your combobox is bound to a field within the datasource
of the form, and the rowsource of the combobox has the
same field in the ordinal position set by the "bound
column" property, it should all work.
you shouldn't need to do anything in the form load event.

-----Original Message-----
I am trying to prepopulate the value in a combo box
during the Load event if the related records already have
a value assigned. The example would be a room choice.
The reservation has already been entered and the room
choice has been set. The agent returns to the record and
I want the room choice combo box to match the record
accessed. The record will be in a subform but the field
that ties both the form and subform is available from
either. I have specified a query to get the information,
I am having trouble getting the recordset open command to
work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top