Solved

Subforms will not refresh

Posted on 2013-05-29
6
265 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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

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

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.

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
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…

705 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

20 Experts available now in Live!

Get 1:1 Help Now