?
Solved

Form Requery in ACCESS

Posted on 2011-10-27
7
Medium Priority
?
376 Views
Last Modified: 2012-05-12
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
0
Comment
Question by:Biggles1
7 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 501 total points
ID: 37037518

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
 
LVL 2

Assisted Solution

by:jdc1944
jdc1944 earned 501 total points
ID: 37037949
I would use the following in the afterupdate

    [Forms]![frmX]![frmSubB].form.requery
0
 
LVL 49

Assisted Solution

by:Dale Fye
Dale Fye earned 498 total points
ID: 37038114
I think that should be:

me.parent.frmSubB.form.requery
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 75
ID: 37040086
All of these syntaxs work ...

mx
0
 

Author Closing Comment

by:Biggles1
ID: 37044049
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
 
LVL 49

Expert Comment

by:Dale Fye
ID: 37045829
If you reset the recordsource, you don't need the code we used.  That act automatically forces the form to requery.
0
 

Author Comment

by:Biggles1
ID: 37047110
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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
Currently, there is an issue with being able to copy values from an external application to a dropdown list in Project Web Access (PWA).  The standard copy and paste methods don't seem to work properly. Here is a way to accomplish this task to s…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question