Solved

Display updated table through a subform

Posted on 2016-11-04
4
24 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
  • 2
  • 2
4 Comments
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 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 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 41874793
glad I could help.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

856 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