Runtime error 2489

  • Thread starter Thread starter Martin
  • Start date Start date
M

Martin

Hello,

I have the following code which I run from combo box 1 to move to combo box
2 after combo box 1 has been updated.

DoCmd.GoToControl "StaffName"
DoCmd.GoToRecord acDataForm, "StaffName", acFirst

Everytime I click on combo box 1 I get a runtime error of 2489 stating that
combo box 2 isn't open.

Does anyone know how to 'open' combo box 2? I though I was doing this by the
GoToControl command.

Thank you in advance.

Martin
 
I think the error might be due to the GoToRecord statement. From what I know
GoToRecord is used to go to a particular record on a form. Access probably
thinks you are trying to go to the first record of a form called StaffName.
You should only need the GoToControl statement to shift the focus to the
StaffName combo box.
 
Back
Top