Run-time Error '2493'

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to save a record and then go to a new record when I hit a button
on my form.
I am getting the following error:

Run-time Error '2493'
This action requires an Object Name argument

Here is the code I have for my save button on the form.

Private Sub cmd_Save_Click()
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.GoToRecord acDataForm, frm_Form111, acNext
End Sub

I can't see anything wrong with it. Can someone please help.

Thanks in Advance
 
Hi,
Your form name should be a string:
DoCmd.GoToRecord acDataForm, "frm_Form111", acNext
 
Try:
DoCmd.GoToRecord acDataForm, "frm_Form111", acNext

The object name needs to be in quotes, just like the example in the Help
file. The error message was trying to direct you to the 2nd argument (i.e,
Object Name) as the problem.

HTH,
 
Back
Top