Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2003
    Gainesville, Florida, USA
    Thanked 0 Times in 0 Posts

    delete cmd (Access 2000)

    I have a form which displays filtered records based on a key selection on a previous form. In a specific case it returns 2 records. I have a delete button on the form which I use to delete the 2nd record. Once deleted, the form does not refresh or take me to the only record left. It actually takes me to a blank record then it gives me an error message if I want to force it to move to the previous record. The message has to do with trying to create a duplicate index record. Once I press ESC a couple of times I can move to the first record. I believe that because I have some field defaults on the form, it creates a new blank record and populates it with the defaults. But how can I avoid this and have it move automatically to the existing "last" record? Thanks for your input.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: delete cmd (Access 2000)

    Add the following line to the code behind the command button that deletes a record, just before the End Sub:


    This forces the form to read the record source again.

Posting Permissions

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