Solved

Display updated table through a subform

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
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…

744 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