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
Dan Artuso - 03 Jan 2005 21:21 GMT
Hi,
Your form name should be a string:
DoCmd.GoToRecord acDataForm, "frm_Form111", acNext
--
HTH
Dan Artuso, Access MVP
> I'm trying to save a record and then go to a new record when I hit a button
> on my form.
[quoted text clipped - 13 lines]
>
> Thanks in Advance
George Nicholson - 03 Jan 2005 21:37 GMT
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,

Signature
George Nicholson
Remove 'Junk' from return address.
> I'm trying to save a record and then go to a new record when I hit a
> button
[quoted text clipped - 14 lines]
>
> Thanks in Advance