You cant go to specified record

deb

Active Member
Joined
Feb 1, 2003
Messages
400
I have a form with an Add Record button.
When the button is clicked when first entering the form, I works great.
When the 1st record is entered and the button is clicked again to enter
another record, I get a msg "You cant go to specified record." I click the
OK button and then...
I am able to click the Add Record button and it works.

I even have Me.AllowEdits = True
Me.AllowAdditions = True in the code

Please Please help
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

VicRauch

Well-known Member
Joined
Mar 23, 2006
Messages
2,032
I believe that if you add this line of code at the top of the code for your Add Record button, it should work.
Code:
DoCmd.RunCommand acCmdSaveRecord
 

deb

Active Member
Joined
Feb 1, 2003
Messages
400
I love the simple solutions...especially when they work perfectly!!!

Thank you!!
 

deb

Active Member
Joined
Feb 1, 2003
Messages
400
I love the simple solutions...especially when they work perfectly!!!

Thank you!!
 

deb

Active Member
Joined
Feb 1, 2003
Messages
400
I love the simple solutions...especially when they work perfectly!!!

Thank you!!
 

deb

Active Member
Joined
Feb 1, 2003
Messages
400
I spoke too soon...

Now when I open the form and click on the Add New button, I get

The command or action Save Record isn't available now.
 

VicRauch

Well-known Member
Joined
Mar 23, 2006
Messages
2,032
Deb,

Put "On Error Resume Next" right in front of the "Save Record" line, then right after the "Save Record" line, put "On Error Goto 0" Sorry I didn't get this the first time. So much for Perfect. :)
 

Forum statistics

Threads
1,181,102
Messages
5,928,069
Members
436,586
Latest member
latintxn

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top