Error "Object doesn't support this property or method"

K

Kelvin Beaton

I'm trying to check the value (SecurityLevel) on one form (frm_AppVars) and
set a CheckBox control value (ExceptionApproved) on the other form
(frm_ExceptionToPolicy) but I get the following error.

Run-Time error '438'
Object doesn't support this property or method

This is the code:
++++++++++++++++++++++++++++++++++++++++++++++++++++++
Private Sub Form_Current()
If Forms.frm_AppVars.SecurityLevel >= 30 Then
Forms.frm_ExceptionToPolicy.Controls.ExceptionApproved.Enabled = True
Else
Forms.frm_ExceptionToPolicy.Controls.ExceptionApproved.Enabled = False
End If
End Sub
++++++++++++++++++++++++++++++++++++++++++++++++++++++

Is it saying that "True" and "False" are not valid values?
I tried Yes/No and it didn't seem to like that either.

Any help would be appreciated

Kelvin
 
K

Kelvin Beaton

I reduced the statement to this
Private Sub Form_Current()
If Forms.frm_AppVars.SecurityLevel >= 30 Then
ExceptionApproved.Enabled = True
Else
ExceptionApproved.Enabled = False
End If
End Sub
and it works just fine

Kelvin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top