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

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
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
 
Upvote 0
I love the simple solutions...especially when they work perfectly!!!

Thank you!!
 
Upvote 0
I love the simple solutions...especially when they work perfectly!!!

Thank you!!
 
Upvote 0
I love the simple solutions...especially when they work perfectly!!!

Thank you!!
 
Upvote 0
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.
 
Upvote 0
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. :)
 
Upvote 0

Forum statistics

Threads
1,214,873
Messages
6,122,029
Members
449,061
Latest member
TheRealJoaquin

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
Back
Top