Results 1 to 3 of 3
  1. #1
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Cannot got to add record (Access 97)

    I have code in a form that when it is opened it does:
    1. a command " DoCmd.FindRecord gFindCat" is executed in the form activate event to display the appropriate record. that works fine, the user can make changes.
    2. when a button is pressed, the code saves the record then does a command
    "DoCmd.GoToRecord , , acNewRec"
    3. it then copies a few fields to the new record.
    When it execute 2. above it bombs with a message "You cannot go to the specified record"

    Can someone please help.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Cannot got to add record (Access 97)

    Did you put the code in the On Open event of the form? If so, try putting it in the On Load event instead.

  3. #3
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Cannot got to add record (Access 97)

    It was more cmplicated than what i had described and what i had described was not quite accurate.

    My prboblem was that the Docmd.showallrecords forced a Form_AfterUpdate, once in there i had other code that terminated the form.

    Before the showallrecords comand i set a condition tat when the afterupdate of the form fired, it just went to exit sub which then returned it to the command after the showallrecords.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •