Yes/No fields

halem2

Registered User.
Local time
Today, 13:16
Joined
Nov 8, 2006
Messages
180
Hi All:

running access 2000.

I have two Yes/No fields in a form: "PassedTest" and "NotTested". I need to... when I click on PassedTest, to uncheck or set to No NotTested and when I click on NotTested, uncheck PassedTest.

This is what I have but is telling me "invalid use of property"

If Me.PassedTest = True Then
Me.NotTested False
End If

thank you for any help.
 
It worked for me

Hailem,


I tried this and it worked for me on Access 2003:
--------------------------------
Private Sub test1_BeforeUpdate(Cancel As Integer)
If Me.test1.Value = True Then
Me.test2.Value = False
End If

End Sub
--------------------------------------------------
Private Sub test2_BeforeUpdate(Cancel As Integer)
If Me.test2.Value = True Then
Me.test1.Value = False
End If
End Sub

-------------------------------------------------
 
You need to put it in the checkbox's AfterUpdate event and then, if your checkbox names are PassedTest and NotTested (not check4 and check6, for example), then
Code:
If Me.PassedTest = True Then
   Me.NotTested = False
End If
would work. You are missing an = sign after Me.NotTested and before FALSE.

Edit
You don't need the .VALUE part
 
Thank you both. I'm gonna shoot myself!!!!!. I missed the "=". I guess I need to walk away from this for a while...

thanks again. :)
 

Users who are viewing this thread

Back
Top Bottom