Referencing to a 2nd subform

ppataki

Registered User.
Local time
Yesterday, 20:36
Joined
Sep 5, 2008
Messages
267
Dear All,

I have a legacy database that contains a form that has a subform that has another subform, and there is a third one as well...
(pls see screenshot)

I would like to know how I can do a reference in VBA to the second and third subforms

Many thanks in advance ;)
 

Attachments

  • 8-27-2010 8-55-46.jpg
    8-27-2010 8-55-46.jpg
    71 KB · Views: 128
Many thanks!!
 
The problem is that it does not work for me
I am on the main form and trying to use this formula:

Me!Subform1.Form!Subform2.Form.RecordSourcein my case it is like:
Me!f_dbo_Users.Form!f_dbo_devices.Form.AllowEdits = False
and I get Runtime error 2455 - invalid reference

Could you please advise?
Many thanks
 
Look at the link again, better yet print it out.

Me!f_dbo_Users.Form!f_dbo_devices.AllowEdits = False

You want to refer to the controlproperty of subform2

Me!Subform1.Form!Subform2.AllowEdits = False

JR
 
Try setting the focus to the subform first.

Me!f_dbo_Users.Form!f_dbo_devices.SetFocus
Me!f_dbo_Users.Form!f_dbo_devices.AllowEdits = False
 

Users who are viewing this thread

Back
Top Bottom