Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Display updated table through a subform

Posted on 2016-11-04
4
Medium Priority
?
38 Views
Last Modified: 2016-11-04
I have an Access form with a subform on it whose records source is a table.  The table's contents get displayed in the subform.

I have a query that updates the table displayed in the subform. Actually what the query does is  adds records to or appends the table.

The query gets invoked by clicking a command button.

After I run the query, how do I get the updated table to display in the subform?

I think it's something like Docmd.Requery but if that's what it is, where do I put it? Or if it's something else entirely, please let me know.

Thanks
0
Comment
Question by:dbfromnewjersey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 48

Accepted Solution

by:
Dale Fye earned 2000 total points
ID: 41874319
add a line of code after your append query is executed, something like:

me.subformControlName.Form.Requery

HTH
Dale
0
 

Author Comment

by:dbfromnewjersey
ID: 41874627
Thanks.   It actually had to be:

me.Parent.subformcontrolname.form.requery to get it to work.
0
 

Author Comment

by:dbfromnewjersey
ID: 41874628
.
0
 
LVL 48

Expert Comment

by:Dale Fye
ID: 41874793
glad I could help.
0

Featured Post

Industry Leaders: 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!

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

670 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