Requery a sub table

D

DW

I have a table that acts as the child (sub form) of a parent (main) form.
There is a command button on the main
form that runs a query which deletes the underlying records of the sub form.
Then, the row of the sub table shows delete. How do I get the sub
table data sheet to refresh or requery so that the error message disappears?
 
J

Jeff Boyce

In a standard mainform/subform design, it isn't necessary to delete the
underlying records then re-fill the table with new records.

By design, the subform control on the main form has a pair of properties
that lets you show Access how a record in the main form is related to
one/more records in the sub form. When you change the main form record,
"it's" subform records just show up.


Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 

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

Top