Subform question...

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

Guest

OK, my question is this.

I have a form/subform. The subform is based on a table where I can do data
entry until it is time to save that captured data. My question is what is
the best way to delete a selected record on the subform? Should I query the
underlying table and delete that item and the requery the subform, or is
there a more elegant way to accomplish this?

Any help would be appreciated.
 
Thanks for the thought. I don't have that enabled.

What I ended up doing was putting a delete button on the main form
and then when that is clicked it passes focus back to the subform to the
record that had focus and then deletes that record.

It works.
 
OK, my question is this.

I have a form/subform. The subform is based on a table where I can do data
entry until it is time to save that captured data. My question is what is
the best way to delete a selected record on the subform? Should I query the
underlying table and delete that item and the requery the subform, or is
there a more elegant way to accomplish this?

Any help would be appreciated.

Well, there is a "simpler" (if not particularly elegant) way; just be sure
that the subform's record selectors are visible, click the bar to the left of
the record, and hit the Delete key.

John W. Vinson [MVP]
 
What I ended up doing was putting a delete button on the main form
and then when that is clicked it passes focus back to the subform to the
record that had focus and then deletes that record.

WUPS! That's dangerous. When you click the button on the mainform the record
on the subform nolonger HAS the focus! I'm not sure you can count on deleting
the correct record!

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top