Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Manassas, Virginia, USA
    Posts
    363
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Add a new record (Access 2002, SP3)

    I have a continuous form with a command button in the form header to add a new record. If there are already many records that have been entered, the new record appears at the top of the form with no previous records visible. How can I modify the code so that at least 5 or 6 previous records are visible. I tried using code to go to the last record, then to the previous record several times before going to a new record and that works as long as there are previous records to go to but in the beginning when there are no previous records to go to, an error message repeats "You can't go to the specified record" even with Set Warnings turned to false.
    Judy Jones, Computer Training Specialist
    Manassas, Virginia

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

    Re: Add a new record (Access 2002, SP3)

    You could simply put a line

    On Error Resume Next

    before the problem line, or create an error handler that ignores the error "You can't go to the specified record".

  3. #3
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Manassas, Virginia, USA
    Posts
    363
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Add a new record (Access 2002, SP3)

    Thanks. I had a line in the error handler to resume next but after your reply I changed its location and now it works fine. Problem solved.
    Judy Jones, Computer Training Specialist
    Manassas, Virginia

Posting Permissions

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