Enabled Property HELP!

UTK

Engineer Bound
Local time
Today, 03:26
Joined
Oct 13, 2004
Messages
17
I am trying to put the following code into my DB

-------------------------------------------------------------------------
If Tested = "yes"
Then TestComments.Enabled = True
Else
TestComments.Enabled = False
End If
-------------------------------------------------------------------------
It is meant to enable or disenable a box (TestComments) based on an answer in Tested. However when i get to the Period after Comments, "enabled" is not a choice. The only choice there is "Value" . What could be causing this? How do i fix it? :(
 
I don't know if this is the case here, but I know that sometimes, you don't get an option written after you put the dot, but you can still use it.
Try to write "enabled = true" even if it isn't in the list given. It might work.
 
You have to key the Me keyword if you want the VBA intellisense to work.
Code:
If Tested = -1 Then
    [B][COLOR=Blue]Me.[/COLOR][/B]TestComments.Enabled = True
Else
    [B][COLOR=Blue]Me.[/COLOR][/B]TestComments.Enabled = False
End If
The Access help files has this to say about the Me keyword...
The Me keyword behaves like an implicitly declared variable. It is automatically available to every procedure in a class module. When a class can have more than one instance, Me provides a way to refer to the specific instance of the class where the code is executing. Using Me is particularly useful for passing information about the currently executing instance of a class to a procedure in another module.
 
I tried both of those methods. I still only see "Value" after the period. Also, when i tried the "Me.TestComments.Enabled" method, i got a VB Compile Error which said "Method or data member not found". Can you think of anything else?
 
Nevermind Gents. I deleted both fields and reinserted them. This fixed the problem. Kind of strange. Thanks for your replies!
 

Users who are viewing this thread

Back
Top Bottom