ShowAllRecords Method

  • Thread starter Thread starter Kenneth Ho
  • Start date Start date
K

Kenneth Ho

Hi all,
I have a main form which contains a sub-form. I open another form to
add a new record.
What I want is, after I add a new record in another form, when I close
it, it will show in the sub-form of the main form.
But it does not, I need to click something else or click
"ShowAllRecords" macro button to refresh it.
What can I do? I've tried to add a command line DoCmd.ShowAllRecords
after DoCmd.Close in that "another form". But it's still the same.
Any comment? Thanks in advance. I'm sorry I'm new in Access. Please
help.

Regards,
Kenneth Ho
 
In your code the closes the second form, or in the close event of that form
add aa line of code:

Forms!FirstFormName!SubformControlName.Form.Requery

Note: The subform control name may or may not be the same as the subform's
name.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Thanks for your reply. However, it doesn't work. I still need to "refresh"
it manually. Any other way?

Regards,
Kenneth Ho
 
Back
Top