![]() | |
![]() |
| | Thread Tools | Display Modes |
#41
| |||
| |||
|
|
lyle wrote: On Nov 23, 10:31 am, "Rick Brandt" <rickbran... (AT) hotmail (DOT) com> wrote: ?Form_Form1.AllowFilters Run-time error '2467' The expression you entered refers to an object that is closed or doesn't exist. A quick check here: Sub temp() Debug.Print Form_Employees.AllowFilters End Sub True is printed in the Immediate Window. Suppose you have two instances of a form open and want to refer to the controls on a form contained in a subform control on the form. If you use Form_FormName which instance of the form is being referenced? |
#42
| |||
| |||
|
|
On Nov 23, 5:35 pm, rkc <r... (AT) rkcny (DOT) yabba.dabba.do.com> wrote: Suppose you have two instances of a form open and want to refer to the controls on a form contained in a subform control on the form. If you use Form_FormName which instance of the form is being referenced? I don't know. Sometime when I consider it either worthwhile to have two instances of a form open (with the form having a subform), or likely that it will happen I'll check into it. |
#43
| |||
| |||
|
|
D... (AT) NoEmail (DOT) com wrote innews:td4dk3hbjljdf1pn052a34ar8b20rpvumi (AT) 4ax (DOT) com: "Me" is a reference to the CLASS MODULE of the object the code is in. |
#44
| |||
| |||
|
|
"Me" is a reference to the CLASS MODULE of the object the code is in. |
#45
| |||
| |||
|
|
lyle <lyle.fairfi... (AT) gmail (DOT) com> wrote innews:48c3dde7-07bd-48b8-91c3-e157b703f92b (AT) f3g2000hsg (DOT) googlegroups.com : Sometime when I consider it either worthwhile to have two instances of a form open (with the form having a subform), or likely that it will happen I'll check into it. Huh? What about a single form with two copies of the same subform? |
#46
| |||
| |||
|
|
I can't believe your applications have such poor UI that you don't use subforms or that you're such a poor programmer that you'd not re-use a form in more than one location if it were appropriate (as it very often is). |
#47
| |||
| |||
|
|
Doug (AT) NoEmail (DOT) com wrote in news:td4dk3hbjljdf1pn052a34ar8b20rpvumi (AT) 4ax (DOT) com: I wish one of them had a short section on globally accessing things that don't happen to to pointed to my "Me." "Me" is a reference to the CLASS MODULE of the object the code is in. If you want to refer to a different object, you have to specify it completely. Another form will be Form!frmOtherForm in place of Me. A form that is embedded in the form you're coding in will be Me!subFormControlName.Form. That's all you need to know. |
#48
| |||
| |||
|
|
I don't really expect to convert anyone to my position on this matter, David, and arguing is tedious. So I'm checking out of this thread now. |
#49
| |||
| |||
|
|
When I use multiple instances of forms it is through code like: Dim ADetailForms(0 To 1) As [Form_Faculty Details] Public Sub OpenSomeFormInstances() Dim z As Long For z = 0 To 1 Set ADetailForms(z) = New [Form_Faculty Details] With ADetailForms(z) .Visible = True .Caption = "Look Ma Multiple Distinguishable Instances of a Form " & z End With Next z End Sub Public Sub ZapAllThoseFormInstances() Erase ADetailForms End Sub |
![]() |
| Thread Tools | |
| Display Modes | |
| |