Results 1 to 5 of 5
  1. #1
    Adam Olson is offline Novice
    Windows XP Access 2003
    Join Date
    Jul 2009
    Posts
    1

    You can't go to the specified record


    When clicking on a link in an access form one of my users is getting an error: You can't go to the specified record. He has full windows security permissions to the file and has full access security to the Workgroup file. T his is the code for the button:Private Sub AddCourse_Click()On Error GoTo Err_AddCourse_Click DoCmd.GoToRecord , , acNewRecExit_AddCourse_Click: Exit SubErr_AddCourse_Click: MsgBox Err.Description Resume Exit_AddCourse_Click End Subwhen i open up this database it works fine. i did not create this database.

  2. #2
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    Surely, all that code isn't on one line.

    Can you user open the table in the table view?

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    This is what it would have looked like if you had used the Code tags (the # on the tool bar)
    Code:
    Private Sub AddCourse_Click()
       On Error GoTo Err_AddCourse_Click
       DoCmd.GoToRecord , , acNewRec
       
    Exit_AddCourse_Click:
       Exit Sub
       
    Err_AddCourse_Click:
       MsgBox Err.Description
       Resume Exit_AddCourse_Click
    End Sub

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Not enough information has been posted yet to offer any suggestions. There is basically nothing wrong with the code you posted but executing it at the wrong time could cause the error you posted. You need to find out what the user sequence is just before they press this button. It sounds like you do not have a valid RecordSource at that time for some reason.

  5. #5
    Husseintech is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2010
    Posts
    4
    thank you very much

Please reply to this thread with any new information or opinions.

Similar Threads

  1. If duplicate record, go to original record
    By BigBear in forum Forms
    Replies: 2
    Last Post: 10-06-2010, 02:58 AM
  2. If duplicate record, go to original record
    By islandboy in forum Access
    Replies: 51
    Last Post: 06-02-2010, 04:17 PM
  3. Replies: 3
    Last Post: 06-27-2009, 03:53 PM
  4. Deleting Record Contents, not complete record...
    By Charles Waters in forum Access
    Replies: 2
    Last Post: 06-24-2008, 12:00 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums