Subform in form.

sdawson

Registered User.
Local time
Today, 22:24
Joined
Apr 22, 2003
Messages
165
I have a subform A in a form B. When a certain field is updated on the subform A, the value of a field in the form B is changed. This is executed by the code Forms!form B!formfield = "99” on the After Update Event Procedure on the subform A. Simple and works OK.

I have put the form B with the subform A in another form, C with tabs. The above change on the subform A now brings up a Run time error ‘2450’ saying that the form B cannot be found.
Why?
 
Bobs link did it for me (after reading it 6 times).
I don't understand Uncle Gizmo's comment "Because you haven't actually put form "B" on to form "C", " and this stumped me for a while.

The following eventually did it for me.

Forms("formC").Controls("containerformB").Form.Controls("field") = "99"

Cheers you guys.
 

Users who are viewing this thread

Back
Top Bottom