By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,500 Members | 830 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,500 IT Pros & Developers. It's quick & easy.

can I reference a subform as an object?

P: n/a
Dim frm as Form
Set frm = Forms!frmMain!frmSub1.Form!frmSub2

Can I do this? I can't seem to get this to work...
What is correct syntax?

-- or how about --

Dim ctl as Control
Set ctl = Forms!frmMain!frmSub1.Form!frmSub2.Form!Myctl

Can I do this?

Thanks!
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

On Wed, 14 Jan 2004 09:59:32 GMT, "deko" <dj****@hotmail.com> wrote:
Dim frm as Form
Set frm = Forms!frmMain!frmSub1.Form!frmSub2
You are trying to set a Form variable to a control. ...frmSub2 is a subform
control, and ...frmSub2.Form is the form in that control. The following
should fix it.

Dim frm as Form
Set frm = Forms!frmMain!frmSub1.Form!frmSub2.Form

....-- or how about --

Dim ctl as Control
Set ctl = Forms!frmMain!frmSub1.Form!frmSub2.Form!Myctl

Can I do this?


Sure, that looks right.
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.