Solved

Display updated table through a subform

Posted on 2016-11-04
4
20 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
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…

932 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now