Full Version: Object Doesn't Support Property Or Method.
UtterAccess Forums > Microsoft® Access > Access Forms
Hi Everyone! I'm having a problem. I found some code that is supposed to make a field on a form not editable if a checkbox is checked.

Private Sub Form_Current()

   If Me![PulseCount] = True Then
     Me![FlowType].Enabled = False
  End If
End Sub

I also have this same code on the Private Sub PulseCount_AfterUpdate() event. (the code I found said it needed it in both places.)

I am receiving a Runtime error 438, Object doesn't support property or method.

I have also tried
If Me.PulseCount = True Then
       Me.FlowType.Enabled = False

But I get a Compile error on that one.

Everything I've researched talks about windows updates and issues with ActiveX controls....but the solutions seem to be from 10 years ago. Any help would be appreciated!
It is hard to say without seeing the database. Try some message boxes to see where you are getting the error:

MsgBox "Pulse Count: " & Me.PulseCount
MsgBox "Enabled = " & Me.Flowtype.Enabled

You should not be getting a compile error, assuming you have End If and just didn't post it. Is there any detail in the error message?

Is PulseCount bound to a Yes/No field? Is FlowType the name of a control that has the option of being Enabled?
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.