AccessChap
Registered User.
- Local time
- Today, 09:24
- Joined
- Apr 14, 2009
- Messages
- 32
Hi guys,
I've got (yet another) weird error on my inherited database. I have a form with the standard navigation buttons in the footer (first record, prev record, next record, last record & new record). When using these to navigate to record 3816 there is no error. However when using a few VBA commands I get the above error message, even though I'm navigating to a record that does exist and can be loaded using the standard navigation buttons
On this form I have a couple of list boxes, both of which have the OnDoubleClick event set to fire off the GoToRecord command. Even stranger, this one works:
...
Request = OpenCall_OnHold.Value
DoCmd.GoToRecord , , acGoTo, Request
...
but this code fails with error 2105:
...
Request = OpenCall_Amend.Value
DoCmd.GoToRecord , , acGoTo, Request (debugger steps in here)
...
I have set a trap on the same line of both instances of the code and found that acGoTo is set to 4 on both with the correct record ID being shown in each case
Given that I have two instances of the same code on the one form but they behave differently I am a little confused... Anyone have a suggestion or some advice on how to diagnose this issue? All help gratefully accepted at this stage!
Cheers,
Andy
I've got (yet another) weird error on my inherited database. I have a form with the standard navigation buttons in the footer (first record, prev record, next record, last record & new record). When using these to navigate to record 3816 there is no error. However when using a few VBA commands I get the above error message, even though I'm navigating to a record that does exist and can be loaded using the standard navigation buttons
On this form I have a couple of list boxes, both of which have the OnDoubleClick event set to fire off the GoToRecord command. Even stranger, this one works:
...
Request = OpenCall_OnHold.Value
DoCmd.GoToRecord , , acGoTo, Request
...
but this code fails with error 2105:
...
Request = OpenCall_Amend.Value
DoCmd.GoToRecord , , acGoTo, Request (debugger steps in here)
...
I have set a trap on the same line of both instances of the code and found that acGoTo is set to 4 on both with the correct record ID being shown in each case
Given that I have two instances of the same code on the one form but they behave differently I am a little confused... Anyone have a suggestion or some advice on how to diagnose this issue? All help gratefully accepted at this stage!
Cheers,
Andy