Microsoft
Software
Hardware
Network
Question : Access database - Problem with gorecord acnewrec
Hi,
I have a split form wherein I have buttons like Add, Delete, Save
In the Form properties, I said - AllowAdditions - No and the datasheet is made as non-editable
It retrives the records correctly. And I don't see any new record added by default.
Now, I click on Add button to add a new record.
Add button code:
-----------------------
me.allowadditions = true
docmd.gorecord , , acNewRec
It throws error in the line docmd.GoToRecord, , acNewRec
Below is the error: Runtime error 2105. You can't go to the specified record..
I feel sometimes it works. Sometimes it does not work.
One more flow is: If I delete one record using docmd.runcommand accmdDeleterecord, then Adding a new record always fails...
Delete button click event:
--------------------------
-------
docmd.Setwarnings false
docmd.runcommand accmdDeleteRecord
docmd.Setwarnings true
docmd.gotorecord, , aclast
Delete button code works fine. But after this if I click on Add button, again I get the same error 2105...
Answer : Access database - Problem with gorecord acnewrec
"datasheet is made as non-editable "
Since the form does not allow edits, you won't be able to go to a new record.
How about
me.allowadditions = true
Me.AllowEdits = True ' **** turn this on here
docmd.GoToRecord, , acNewRec
Random Solutions
IIS7 Port 80 Redirection in an App
Need to calculate net working hours... networkHOURS?
Configure SharePoint 3.0 to send document library alerts that include "comments"
Itunes windows 7 64 bits compatibility management
strName and msgbox
Pb in sharepoint MOSS 2007 with explorer view - webdav
How to hide a startup form
MS Access 2003 - Assign Current Date and Current time to two different keystrokes
Can install Money update in Windows 7
WNetOpenEnum and WNetEnumResources problem