Results 1 to 5 of 5

You can't go to the specified record

  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 llkhoutx
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    340
    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
    10,896
    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
    (RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 Pro - acXP, ac07, ac10, ac13
    If your issue is resolved...go ahead and use the Thread Tools at the top of the thread and mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  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
    10,896
    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.
    (RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 Pro - acXP, ac07, ac10, ac13
    If your issue is resolved...go ahead and use the Thread Tools at the top of the thread and mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  5. #5
    Husseintech is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2010
    Posts
    2
    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, 01:58 AM
  2. If duplicate record, go to original record
    By islandboy in forum Access
    Replies: 51
    Last Post: 06-02-2010, 03:17 PM
  3. Replies: 3
    Last Post: 06-27-2009, 02:53 PM
  4. Deleting Record Contents, not complete record...
    By Charles Waters in forum Access
    Replies: 2
    Last Post: 06-24-2008, 11:00 AM

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
  •  
Tech Forums: Microsoft Office Forums