Form Requery in ACCESS

I have a form (no Data Source). Call it frmX, in which are two data forms, frmSubA and frmSubB (side by side).  I need the AfterUpdate event in a frmSubA text box to trigger a Form "Refresh" or "Requery" in frmSubB.

Nothing I try seems to work unless I manually CLOSE frmX (with its two sub-forms) and Re-open it!

Help!

Biggles1
Biggles1Asked:
Who is Participating?
 
Rey Obrero (Capricorn1)Commented:

call the requery this way, from frmSubA textbox afterupdate

             me.parent.frmSubB.requery


just make sure that "frmSubB" is the name of the subform control
0
 
jdc1944Commented:
I would use the following in the afterupdate

    [Forms]![frmX]![frmSubB].form.requery
0
 
Dale FyeCommented:
I think that should be:

me.parent.frmSubB.form.requery
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
All of these syntaxs work ...

mx
0
 
Biggles1Author Commented:
All three worked HOWEVER I had to add the following code BEFORE:

me.parent.frmSubB.form.RecordSource = "qryXXXX"
or
[Forms]![frmX]![frmSubB].form.RecordSource = "qryXXXX"

THEN
The 3 code examples you all gave me worked like a charm!

Thanks guys!
0
 
Dale FyeCommented:
If you reset the recordsource, you don't need the code we used.  That act automatically forces the form to requery.
0
 
Biggles1Author Commented:
Hi Fyed, Thanks for your responses.  Actually for some reason, just restating the Record Source did NOT work by itself.  I had to your your code as well.

Regards,

George
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.