froggiebeckie
Registered User.
- Local time
- Today, 07:08
- Joined
- Oct 11, 2002
- Messages
- 104
I have a data entry form for test results.
The tests have some common fields, but also some unique fields.
I'm trying to have the unique fields visible/invisible, based on the type of test selected in the Test field.
I have the following code in the AfterUpdate event of the TEST field.
It works fine as long as I don't include the 4th field [ShortBeamStrength(ksi)].
Doesn't matter whether the result is set to True or False, the code errors out with "Run-time error '438': Object doesn't support this property or method".
If I remove both the True and the False conditions for this field, the other 3 respond correctly. If I remove one or the other of the conditions, the remaining one errors out.
I've double and triple-checked the field name, even copying and pasteing directly from the form.
Any idea why this field is causing the code to error out?
Thanks in advance,
BeckieO
The tests have some common fields, but also some unique fields.
I'm trying to have the unique fields visible/invisible, based on the type of test selected in the Test field.
I have the following code in the AfterUpdate event of the TEST field.
Code:
Private Sub Test_AfterUpdate()
If Me.Test = "3PtBend" Then
Me.[StressAtYield(ksi)].Visible = True
Me.[EnergyToYieldPoint(lbf-in)].Visible = True
Me.[Modulus_2To_5(ksi)].Visible = False
Me.[ShortBeamStrength(ksi)].Visible = False
Else
Me.[StressAtYield(ksi)].Visible = False
Me.[EnergyToYieldPoint(lbf-in)].Visible = False
Me.[Modulus_2To_5(ksi)].Visible = True
Me.[ShortBeamStrength(ksi)].Visible = True
End If
End Sub
It works fine as long as I don't include the 4th field [ShortBeamStrength(ksi)].
Doesn't matter whether the result is set to True or False, the code errors out with "Run-time error '438': Object doesn't support this property or method".
If I remove both the True and the False conditions for this field, the other 3 respond correctly. If I remove one or the other of the conditions, the remaining one errors out.
I've double and triple-checked the field name, even copying and pasteing directly from the form.
Any idea why this field is causing the code to error out?
Thanks in advance,
BeckieO