Solved

Subforms will not refresh

Posted on 2013-05-29
6
269 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
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)

 

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS Access 2012, Split Form 2 39
Sum in Split Form 17 28
How do I bind a table in Access 2013 to a form 5 33
Need to prompt to save file from VBA if file exists 6 28
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…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

860 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