combo box and record navigation

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?
 
R

Roger Carlson

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.
 

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