question about updating fields in subform from mainform

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

Guest

hi,
I already asked a question about relating subforms and forms. I got it to
kind of work now, but I want to make the subform update without me having to
hit enter from the main form. I put this in the 'exit' event of the field in
the main form:
 
It seems you post got cut-off, but I may be able to help. Depending on how
you've programmed things, in order for something like Me.SubForm.Requery to
work, the data that the subform depends on must be saved in the main form
first. So there really is no way around hitting enter unless you reconsider
the form-subform relationship.

If you want live updating of the subform based on what a user types into a
text box in the main form, the datasource for the subform must be a query.
The criteria for the query can be something like:

[Forms]![MainForm]![TextBox].Text
OR
Like "*" & [Forms]![MainForm]![TextBox].Text & "*"

Then you can use the text box's OnChange event to trigger a requery. HTH
 

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