Setting the value in a combobox at Load

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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.
 
Back
Top