Combo box Question

  • Thread starter Thread starter cleaver
  • Start date Start date
C

cleaver

Can you synchronize a combo box with the navigation
buttons on a form? I have a combo box on a form that
allows you to choose the correct customer and I want it to
move to the corresponding record on the navigation bar.
Right now, it allows me to choose the customer but the
navigation bar stays at 1.

It seems like I should use a macro or something...Any
advice would be greatly appreciated.
 
cleaver said:
Can you synchronize a combo box with the navigation
buttons on a form? I have a combo box on a form that
allows you to choose the correct customer and I want it to
move to the corresponding record on the navigation bar.
Right now, it allows me to choose the customer but the
navigation bar stays at 1.

It seems like I should use a macro or something...Any
advice would be greatly appreciated.

ComboBoxes have two main uses. They are either used as a way to enter data
consistently and from a restricted set of choices, or they are they are used to
navigate the form to a specific record. It sounds like you want the latter.

The easiest thing would be to delete your current ComboBox and then add another
making sure that the toolbox wizard is enabled. One of the choices from the wizard
when adding a ComboBox is...

"Find a record on my form based on the value I selected in my combo box."

If you choose that option the wizard should take care of all of the code required for
you.


--
*******************************
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
*******************************
 
You need to add code to the combo box's AfterUpdate event to match and find
the selected record. Use the Code Builder in the combo box's afterupdate
event and enter the following code:

DoCmd.GoToControl "Customer ID" (quotes required)
DoCmd.FindRecord Me![ComboBoxName]
 
Back
Top