Click on a button must change table value

The_Freak

New member
Local time
Today, 19:04
Joined
May 16, 2001
Messages
8
I have a table whit a field "yes/No"

The defaultvalue is set to "No"

I have a form with a button

Now when i click the button i want that the the value of the checkbox change from "No" to "Yes" automatticly. Anyone know how to do this?
 
Hi Freak
One of possible solutions would be to toggle the value of the Yes/No field.

Presuming that you have a recordset bound to your form and the name of the "Yes/No" field is 'Test_Yes_No'.
You could toggle the value in the recordset like ....

Private Sub cmd_Yes_No_Click()
Me.Test_Yes_No.Value = Not (Me.Test_Yes_No.Value)
Me.chk_Test.Requery 'chk_test is a check box bound to your field - so you can see what the value in the field is
End Sub

Hope it helps

Kaspi
 

Users who are viewing this thread

Back
Top Bottom