toggle/checkbox to textbox

A

adriany

can anyone direct me to good example of toggle or check
box?

i have txtbox1 = date() to table field.
i want to add toggle/checkbox to link to txtbox1 and
when toggle/check box = -1, i want to have it date() =
blank on the table field.

i know i can use if and then but how do i combine with
case statement.

thanks
 
P

PC Datasheet

Add a checkbox named MyCheckbox to your form. Put the following code in the
AfterUpdate event of the checkbox:

Select Case MyCheckBox
Case True
Me!TextBox1 = Null
Case Else
Me!TextBox1 = Date()
End Select
 

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