Can I use a variable to shorten this: - see message

Jenny Peters

Registered User.
Local time
Today, 21:06
Joined
Sep 16, 2001
Messages
14
Can I use a variable to shorten this:
Forms![frmMain]![frmSub].Form![frmSubSub].Form![Field]
to something like:
variable.Form![Field]

What kind of variable would this be and how do I dim it?

Jenny
 
Dim ctl As Control

Set ctl = Forms![frmMain]![frmSub]

ctl.Form![frmSubSub].Form![Field]

Or

Set ctl = Forms![frmMain]![frmSub].Form![frmSubSub]

ctl.Form![Field]
 

Users who are viewing this thread

Back
Top Bottom