Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to execute a Procedure in the Parent form?? 2

Status
Not open for further replies.

dannydanny

IS-IT--Management
Oct 9, 2002
109
0
0
DK
Hi,

I have a form with a subform. I would like to write code in both forms to execute/trigger procedures in each other i.e. have the subform trigger a procedure in the parent form and have the parent form trigger a procedure in the subform. How would I code this?

me.parent.form.procedureName() didn`t work...

Thanks for any help,
Danny
 
First make your procedure PUBLIC not private

Then call it like so
Forms![parent name].form.[procedure name]

DougP, MCP
 
Try

'declration
public sub x(y as string)

'Call
x "dog"

you may need to put your public procedures into a global modual

and edit the referances

Me.

will be replaced be

Forms!<formnName>!form!<ControlName>
 
Thanks DougP and JimYellow!! You both solved my problems and my code works with no problems now.

Cheers,
Danny
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top