Question about Microsoft Office Standard for PC
Hello again, This is a continuation from my last problem. I am having trouble with getting some of my command buttons to work properly. When the add record command button is clicked, a window pops up saying "You can't go to the specified record". I right clicked the command button and went to properties, under the "event" heading and the "On Click" option I clicked the "..." which brings me to the code page which shows the following: Private Sub Add_Record_Click() On Error GoTo Err_Add_Record_Click DoCmd.GoToRecord , , acNewRec Exit_Add_Record_Click: Exit Sub Err_Add_Record_Click: MsgBox Err.Description Resume Exit_Add_Record_Click End Sub I'm not sure what this means but from this information and am not familiar with Microsoft Access. Can you find out what I have to do to get this command button to work properly as simply put as possible? Thanks for your help -Lensa
Hi Lensa, The code is fine there should not be any problem with it. Do not change anything on it. In my opinion the buttons and code has nothing to do with it since they are done automatically and usually work fine. When you press the add new button you are not just creating a new record you are also updating the last record. This button just send you to a new empty record for you to fill. From my experience the error message is due to 3 major reasons: 1. Your record source for this form is a query that cannot be updated 2. You don't have writing permissions to the database. Check and see if the file is locked or its on read only, Check security options and see if the database is read only etc. 3. Your records are locked by the table setting for some reasons, primary key fields might create duplicates. If its just a table try updating the table without a form and see what happens. As I wrote above the problem is with the record source or the database and since I can't see what you have there I can't help you further. I would also suggest you should practice with a simple table first before going into advance queries. Create a table with some simple fields like: ID - Primary key - Auto Number First name - Text Last name - Text Then create a form of that table and start filling in the names and test all the buttons, that will give you an idea of each button and I am sure it will be easier. Good luck Daniel
Posted on Aug 16, 2007
Tips for a great answer:
Mar 23, 2013 | Microsoft Office Home and Student 2007...
Mar 14, 2011 | Microsoft Office Professional 2007 Full...
Feb 27, 2011 | Microsoft Office Professional 2007 Full...
Jan 05, 2011 | Microsoft Office Standard 2007: Windows
Aug 29, 2009 | Microsoft Office Professional 2007 Full...
May 02, 2009 | Business & Productivity Software
Oct 04, 2007 | Microsoft Office Standard for PC
Aug 14, 2007 | Microsoft Office Standard for PC
109 people viewed this question
Usually answered in minutes!
Level 3 Expert
Level 3 Expert
Level 3 Expert
Step 2: Please assign your manual to a product: