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
I can't get the Ajax script manager to be recognized by visual studio 2005??
uninstall 2008 sql server
Windows 7 in a workgroup with network shares
Open Sharepoint server's pdf file in asp.net...
time as number?
How can I log on locally to a perimeter domain machine with a user from an internal domain account?
Save Record Only On Save
GPO Server 2003 XP Pro Clients Wallpaper
Trimming
SQL Delete Syntax