get field value from nested subforms (1 Viewer)

Tallica

Registered User.
Local time
Yesterday, 20:06
Joined
Jul 27, 2010
Messages
26
I have a form. This form has a subform. The subform has a subform.

I am trying to write some code that gets a field value on the subforms subform.

Me.AHJ = Forms![Project Details]![BLDG subform].[submittal requirements subform].Form![ASMPRE Submit to]

I get an error Cant find the specified "submittal requirements subform"

That is the name of the nested subform and not the field on it.

Please help
 

Tallica

Registered User.
Local time
Yesterday, 20:06
Joined
Jul 27, 2010
Messages
26
So i looked at the link you posted and found this

Forms!Mainform!Subform1.Form!Subform2.Form!ControlName

Which equals this

Me.AHJ = Forms![Project Details]![BLDG subform].Form![submittal requirements subform].Form![ASMPRE Submit to]

Which gives me this error

Run-Time Error '2465':

Can't find field 'submittal requirements subform' referred to in your expression.
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 20:06
Joined
Aug 30, 2003
Messages
36,140
Are you aware of the difference between the name of the subform control on a form and the name of the form contained in that control? If they're different, you need the name of the control.
 

Tallica

Registered User.
Local time
Yesterday, 20:06
Joined
Jul 27, 2010
Messages
26
I got it. It was a typo. Thanks for the quick reaponse and the links. I am going to keep that one around.
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 20:06
Joined
Aug 30, 2003
Messages
36,140
Glad you got it sorted out.
 

Users who are viewing this thread

Top Bottom