Check Checkbox

K

Kate

I have a filed defined as a checkbox. If it's checked then
what do I check the field for in my code? True and False?
 
P

PC Datasheet

If Me!NameOfCheckBox = True Then 'Checked = True
<<Do This>>
Else
<<Do That>>
End If
 
N

Niklas Östergren

Or you could just use:

If NameOfCheckBox Then 'Since a checkbox is boolean it´s true or false just
as it is.
' so by just checking the
checkbox status is the same thing
' as checking if it´s true or
false.
<<Do This>>
Else
<<Do That>>
End If


// Niklas
 
N

Niklas Östergren

Ok!
I din´t know that so now I have learn something new!

Thank´s for correcting me Jeff!

// Niklas
 

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