combo box and record navigation

  • Thread starter Thread starter steve
  • Start date Start date
S

steve

I have a simple form with a combo box that I'm using to
select the records. But when I open the form the combo
box is empty but the first record is selected, also when
I use the navigation buttons the combo box dose not
change but the record dose. How do I update the combo box
with the appropriate record?
 
Assuming you used the ComboBox wizard to create the combo box, the combo is
probably bound to the primary key field of the record. So in the OnCurrent
event of the form, set the combo value to the value of the primary key of
the current record. Like this:

Private Sub Form_Current()
Me!cboISBN = Me!BookID
End Sub

Where BookID is the primary key field of the record.
 
Back
Top