Runtime error 2489

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
 
J

Jim Burke in Novi

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.
 

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