Subform not updating

matthewnsarah07

Registered User.
Local time
Today, 13:13
Joined
Feb 19, 2008
Messages
192
Main form = frmmain
Sub form = frmmainsub

I have two fields on the main form & [User] that are populated using the on open event for the main form. User is based on a table and is populated by the GetUser function

The subform is based on qryleaveview which uses field [Email] to filter the data, however when I open the main form there are no records in the subform - I know this must be to do with the fact that the field [email] is populated on open but how do i rectify this?

Thanks
 
Have you tried a requery of the subform after populating the values?
 
I thought of that but I've not used that function before, is it:

DoCmd.Requery? would it be best to add this to the on load event of the main form?

Thanks for your help
 
Try something like

Me.SubformControlName.Form.Requery
 
No, use in the MAIN form:

Me.frmmainsub.Requery

HTH
 
Thanks both for your help - place the requery in the on load of the main form and works a treat
 

Users who are viewing this thread

Back
Top Bottom