refresh a subform?

  • Thread starter Thread starter Troy
  • Start date Start date
T

Troy

I have a subform that has two columns. I run a query (command button) that
appends the table that this subform supports. When I append the table the
form is not refreshing at all. Is there a syntax I can use that will
refresh the subform?

Thanks,

Troy
 
****Untested****
(code to run your Append Query)

DBEngine.Idle dbRefreshCache
DoEvents

Forms!MainForm!SubFormCONTROL.Form.Requery
****Code Ends****

1. The code needs the DAO Library in the References

2. You need to check the name of the SubformCONTROL in the DesignView of the
main Form. It may or may not be the same as the name of the Form being used
as the Subform (more technically correct, being used as the SourceObject of
the Subform Control).
 
I used that code but I get the error "object doesn't support this property
or method". I errored, it's not a subform, but rather a form in a tab
control. I've tried numerous combinations of code, but I still get that
error.

What do you mean when you say I need the DAO library in the references?
 
I forgot to add this form has two fields. Would it be better logic to
requery the entire form?
 
Back
Top