Solved

Subforms will not refresh

Posted on 2013-05-29
6
268 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 120

Expert Comment

by:Rey Obrero (Capricorn1)
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 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 39204557
tell me, how it is not working?
0
Back Up Your Microsoft Windows Server®

Back up 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 120

Accepted Solution

by:
Rey Obrero (Capricorn1) 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

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

803 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