Delete records

  • Thread starter Thread starter frank
  • Start date Start date
F

frank

Hello all,

I have a main form that contains two continuous sub
forms. I would like to create a delete button on the main
form that will delete selected records from the active sub
form that has the focus only. How would I do this?

Thanks
 
Won't work that easily....when you click the button on the main form, the
focus will be on the button, not on the subform. So how will the button know
which subform is the one to use? Might be able to use the 'previouscontrol'
property of the Screen object, but that won't be 100% reliable if the user
has navigated somewhere else in between being in the subform and clicking
the button.

Why not put a delete button in the detail section of the subform? It'll
repeat for each record, and when you click it, it'll "know" which record
you're on and which record to delete.
 
Back
Top