calling a subform event from the main form. (1 Viewer)

BigMr.C

Registered User.
Local time
Today, 17:27
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.
 

macca the hacke

Macca the Hacca
Local time
Today, 06:27
Joined
Dec 1, 2005
Messages
221
Would the data in the subform change if the main form was closed then opened again? If so, then me.requery would work.
 

ansentry

Access amateur
Local time
Today, 15:27
Joined
Jun 1, 2003
Messages
995
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

Top Bottom