Refresh data in the forms by close other form

Kristaline

New member
Local time
Today, 00:40
Joined
Mar 31, 2009
Messages
8
Hi there

I am new in vba coding and I have a problem with my data in main form frmMainForm.To enter data to main form I have button to open frmProject form. When I have all data entered and closed frmProject form, data in frmMainForm combo box projects won't update. Anyone can help me sort this problem please?
 
In the close event of frmProject, you can use

Code:
If CurrentProject.AllForms("frmMainForm").IsLoaded Then
   Forms!frmMainForm.Requery
End If

You might need to capture info about which record you are on and then have code navigate because the requery will likely send you back to the first record.
 
Thanks Boblarson. It's very quick reply and the code is working! :D
 
GladWeCouldHelp.png
 

Users who are viewing this thread

Back
Top Bottom