Delete Query Focus?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a delete query running on the close event of a form. It works for the
first record, but doesn't work if you move to the second or third or so on.
The delete query draws one of it's parameters from the opened form. I think
it keeps drawing it's focus from the first record, obviously, how do I have
it draw focus from the record that is displayed? Thanks in advance.

Neil Cash
 
Why does it matter what record it is when the code is assigned to the Close
event?

Also, feel free to visit the Access Forms newsgroup(s) for more, better,
faster info about forms design and coding.
 
The records of the form are previously auto-populated to some degree. But
the way it's set up, there is a slim chance that there may be redundant
records. The delete query gets rid of these records, hopefully depending on
what form is displayed. I'd put in the before/after update event, but if
that were to happen, there's a possibility that the rest of the records would
be deleted while the user is filling out the form. Does the before/after
update event happen as you're scrolling through records on a subform, as long
as you stay on the main form? Or does it occur only in the main form record
scroll? Do you have a suggestion for a better event?
 
Back
Top