calling a subform event from the main form.

BigMr.C

Registered User.
Local time
Today, 20:18
Joined
Mar 1, 2005
Messages
14
I have a main form with a subform. I need to update values in the subform when a field on the main form is updated using afterupdate on that control.

Example:
main form name: mainform
control name: gst (on main form)

subform name: subform
records displayed as datasheet.
records field to update: retail

In main form gst control afterupdate event:
Me.[subform].[Form].retail_afterUpdate

Hoping to call the afterUpdate procedure on the retail field.

Error message:
Method or data member not found.
 
Would the data in the subform change if the main form was closed then opened again? If so, then me.requery would work.
 
In the After Update of the GST control on your main form put this;

Code:
Me.[B]NameofYourSubForm[/B].Requery

Make sure the name in bold is the name of the subform control on your main form.
 

Users who are viewing this thread

Back
Top Bottom