did you verify the name of the subform control *within the mainform*? a
subform is a form that is "housed" or "contained" in a control inside of
another form. that "container" control is the subform control within the
mainform. in your code, you need to make sure you're referring to the name
of the container control - NOT the name of the subform form object as it
shows in the database window. to get the correct name: open the mainform in
Design view. within the mainform, click *once* on the subform to select it.
in the Properties box, click on the Other tab and look at the Name property.
that's the name of the subform control within the mainform. for example,
let's say the above steps showed the subform control name as ChildMonitor.
assuming that the code is running in the mainform, the reference would be
Me!ChildMonitor.Form!ClaimMonitoring.Enabled = True
hth
Good Day Gentlemen,
I have tried the solution below, which makes perfect sense, but I continue
to received a runtime error 438 (Object doesn't support this property or
method). The code is included below. Any thought of what I might be
doing
wrong?
Mainform = frmWorkload Information Tracker
Mainform field = WorkCategory
Subform = frmRouting
Subform field = ClaimMonitoring
Private Sub WorkCategory_AfterUpdate()
Select Case Me.WorkCategory.Column(2)
Case "RATES", "PLANS", "CO-PAY", "ACCUMULATIONS"
Me!frmRouting.Form![ClaimMonitoring].Enabled = True
Case Else
Me!frmRouting.Form![ClaimMonitoring].Enabled = False
End Select
End Sub
Thank you
:
John, thanks for the assist.
John... Visio MVP
On Sun, 12 Apr 2009 09:21:01 -0700, Beeyen
<
[email protected]>
wrote:
Good Day John
Thanks for the assistance, the commas worked. Now I received another
Run-time 2465, The mainform can't find the field 'Claims Monitoring'
referred
to in your expression.
Could it be that the coding does not reference that the 'Claims
Monitoring'
field located in a Tab Subform called Routing?
Yes. A Subform is another form; Me! refers to the form on which the
code
exists (the main form in this case). The syntax for referencing a
subform
is
peculiar: you need to use the name *of the Subform control* (which may
be
different than the name of the Form object within that control). Try
Case "RATES", "PLANS", "CO-PAY", "ACCUMULATIONS"
Me!Routing.Form![Claims Monitoring].Enabled = True
Case Else
Me!Routing.Form![Claims Monitoring].Enabled = False
This means "look in the Subform control on this form (Me) named
Routing;
look
at the Form object within that Subform control (Form!); find the
control
named
[Claims Monitoring] and enable/disable it.