Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

end of a recordset error message

Status
Not open for further replies.

rsims

Programmer
Sep 25, 2000
12
US
I have a button called insert next record that runs the following code after data entry is complete.

private sub button 24_click ()

docmd.save
docmd.gotorecord , , acnewrec

end sub

The following error messgae comes up when I click it.
rutime 2105
you can't go to the specified record
you may be at the end of a recordset

I'm just trying to allow for additional data entry of records. Please help.
 
rsims,

I have no problem when I use that code. Try using the button wizard to write the code for you with an error handler. Seems to be just as easy as typing it out.
By the way if you are trying to save the current record with docmd.save you should change your code to this:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

The docmd.save is used to save the current object such as a form or subform.
 
Is the form's "AllowAdditions" property set to "No"? If it is, it needs to be set to "Yes" so records may added. Or maybe the recordset behind the form is based on a non-updateable query?




"I know what you're t'inkin', ma petite. Dat Gambit... still de suave one, no?"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top