Hello, I added 5 different command buttons to my form with the wizard. I followed all the steps (ie. gave the buttons names and commands such as print record, add record, delete record and so on). However only 2 out of the 5 function properly and carry out the commands (delete and print commands). When I click on the others, a dialogue box pops up and says " You can't go to the specified record" I'm not sure why the others are not working. Can you let me know how I can get the add record command to work? Many Thanks! signed Access beginner
Not w/o you sharing how you did it step by step. Can you add some screenshots of the steps you tok to get there? In general "add record" should jump to another form that allows you to enter your data for the new record and "save" it.
Posted on Aug 15, 2007
Found this expertly mention of the type of error you are getting on MS-Access website.
---
SYMPTOMS
Advanced: Requires expert coding, interoperability, and multiuser skills.
When you perform an action in the BeforeUpdate event, you receive the following error messages, even if you have canceled the event.
In Microsoft Access 7.0 and 97:
- Runtime error '2105'
You can't go to the specified record
- Runtime error '2115'
The macro or function set to the BeforeUpdate or ValidationRule property for this field is preventing Microsoft Access from saving the data in the field.
In Microsoft Access 2.0:
- Field or record can't be saved while it's being validated.
- Command not available: UndoCurrentRecord.
- Can't go to specified record.
CAUSE
Microsoft Access cannot perform the specified command because the BeforeUpdate event procedure is still running. This is true even if the Cancel parameter is set to True or if a CancelEvent macro attempts to cancel the action.
These error messages are generated by the following statements in the BeforeUpdate event procedure:
' Undo the current record. (Microsoft Access 2.0 only)
' NOTE: This behavior no longer occurs in Microsoft Access 7.0 and 97)
DoCmd DoMenuItem A_FORMBAR, A_EDITMENU, 1
' Goto a new record.
DoCmd.GoToRecord , , acNewRec '(Microsoft Access 7.0 and 97)
DoCmd GoToRecord , , A_NEWREC '(Microsoft Access 2.0 )
' Find a record
DoCmd.FindRecord "Smith", , True, acAll, True '(Microsoft Access 7.0 and 97)
DoCmd FindRecord "Smith", , True, A_ALL, True '(Microsoft Access 2.0)
RESOLUTION
Instead of setting the Cancel parameter to True, or using the CancelEvent action, use a SendKeys statement if that is an option with the command you are trying to use. The SendKeys statement sends keystrokes to the Microsoft Access buffer, where they wait until the BeforeUpdate event procedure is finished.
---
Not sure if it helps you as an Access beginner.
×
Jun 24, 2011 | Microsoft Windows XP Home Edition English...
Jun 22, 2011 | Computers & Internet
Apr 13, 2011 | Microsoft Windows 7 Ultimate 32 & 64 BIT
Feb 21, 2011 | Microsoft Computers & Internet
Nov 26, 2010 | Polaroid FLM-3732 Television
Apr 08, 2010 | Microsoft Office Excel 2007
Feb 23, 2010 | 1995 Lincoln Continental
Feb 12, 2009 | Microsoft Windows Server Standard 2003 for...
Nov 18, 2008 | Microsoft Office Professional 2007 Full...
632 views
Usually answered in minutes!
i am not seeing any instructions to follow when i insert an action button in ms access 2007
×