get field value from nested subforms

Tallica

Registered User.
Local time
Today, 08:19
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
 
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.
 
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.
 
I got it. It was a typo. Thanks for the quick reaponse and the links. I am going to keep that one around.
 
Glad you got it sorted out.
 

Users who are viewing this thread

Back
Top Bottom