Solved

Subforms will not refresh

Posted on 2013-05-29
6
267 Views
Last Modified: 2013-05-29
I have all but got part of a database written, but I am stumped on a little issue.

In the attached sample database (all the data is made up), the frmEditGroup will not refresh the subforms containing the contact details.

There is another form (frmNewGroup) on which the Edit form is based, that works fine.

I cannot see what is wrong.  The code on the After_Update event on the combo boxes looks fine (and works on the “NewGroup” form)

Hope someone can help me here.

Regards
Richard
Test-database.mdb
0
Comment
Question by:rltomalin
  • 3
  • 3
6 Comments
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 39204465
try adding the field "GroupID"  to the record source of the subform  containing the contact details.
0
 

Author Comment

by:rltomalin
ID: 39204543
Hi capricorn1
Thanks for the feedback.  That doesn't seem to make any difference.
Adding the GroupID into the subform query doesn't make any difference to the fact that the NewGroup form works fine (and it uses the same subform and code.

Any other suggestions?

Regards

Richard
0
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 39204557
tell me, how it is not working?
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:rltomalin
ID: 39204586
Hi capricorn1

On the frmEditGroup form - selecting a different Contact in the combo box does not refresh the contact details shown in the subform.
In the frmNewGroup form this works fine (but to show this you need to create the new contacts of course.

Hope that is clear.

Regards

Richard
0
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 39204656
use these codes

Private Sub cboMainContactID_AfterUpdate()
Me.Dirty = False
    Me.MainContactDetails.Form.Requery ' update the subform
       
End Sub
0
 

Author Closing Comment

by:rltomalin
ID: 39204712
Excellent - just got it sorted before I go on holiday!!

Thanks very much capricorn1

Best regards

Richard
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

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…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
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.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

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