OpenArgs and forms

redBo

New member
Local time
Tomorrow, 05:01
Joined
Jan 16, 2007
Messages
9
Hi, it's me again...

This time I have a child form that has two parents and could be called (ie opened by DoCmd.Open.....) by either parent. Once the child has done it's thing, it needs to write a value back to the parent form (the callee). The field it writes to is the same in both forms...

However to findout who the parent is I am passing the name of the callee as an OpenArgs. Ie:

DoCmd.OpenForm, "childForm", acNormal, , , , , "frmParent1"

then to write back in the child form, I did this when there was only one parent:

Forms!frmParent!toField = writeValue

how could use the OpenArgs to change the form to which data is written to?
This doesn't work:

Forms!OpenArgs!toField = writeValue

So what should I do? Thanks for your help all!!!
 
I think wrappnig the openargs in brackets should work:

Forms!(Me.OpenArgs)!toField = writeValue
 

Users who are viewing this thread

Back
Top Bottom