How make tickbox return Y/N

chris-uk-lad

Registered User.
Local time
Today, 14:59
Joined
Jul 8, 2008
Messages
271
Hi,

I have tickboxs on a form im using to add / update records in a linked table. When the tickboxes are selected the set the field in my database to 0 or -1 instead of Yes and No. Is there anyway to change this to Yes and No?

Thanks
 
If me.TickBox = 1 Then
field = True
Else
field = False
End If

and vice versa
 
0 and -1 in "access language" are False and True respectively...
 
be careful

you could change the field to a text field and store the values Y and N

but as you use Access, you will surely find that the native computer values TRUE and FALSE are

a) equivalent but
b) far more efficient and easy to work with

You can easily choose to display True and False as Yes and No, where you need this
simply, with something like iif(field=true,"Yes","No")
 

Users who are viewing this thread

Back
Top Bottom