Requerying not working

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

Guest

I have a subform that isn't requery on demand.
The form is connected to a query that is basically created on the fly
I tried adding docmd.requery in the subform onactivate() and in the command
button that triggers the subform.
Looked on the boards for answer but nothing. Please help
 
Justin said:
I have a subform that isn't requery on demand.
The form is connected to a query that is basically created on the fly
I tried adding docmd.requery in the subform onactivate() and in the command
button that triggers the subform.


If you are constructing the subform's query in code and
setting its RecordSource property on the fly, then there is
no need to requery it. If you are modifying a QueryDef's
SQL property, then that's the long way around, just assign
the SQK statement to the RecordSource property.

To answer your specific question, the syntax to requery the
subform from the main form is:
Me.subformcontrol.Form.Requery
or via code in the subform:
Me.Requery
or, from anywhere:
Forms!mainform.subformcontrol.Form.Requery
 

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

Similar Threads

field not by that name 5
subform based on external SQL won't requery 1
requery not working 7
requery continuour subform 11
Requery Multiple Subforms 2
Requery not! 7
requery subform 2
A2K Subform Requery 2

Back
Top