The checkbox values are in fact True or (-1) or False or (0).
You can't change the 'value' if the checkbox is bound to a field in a table - because these are it's values, end of story.
The only other way would be to bind aother control (such as a textbox) to the field, when the checkbox is clicked use this code....
[tt]
If (myChkBox) then 'If checkbox ticked then
MyTxtBox = 1
else
MyTxtBox = 0
endif
[/tt]
Another way instead of the code would be to add the following to the textbox's 'Control Source' property...
[tt]
iif(myChkBox=True,1,0)
[/tt]
which does the same thing.
Bit of an hassle because at the end of the day you will still be referring to 1's and 0's, except you'll always have to 'interpret' the values instead of letting Access/VB automatically do it for you.
Kind regards,
Darrylle
"Never argue with an idiot, he'll bring you down to his level - then beat you with experience." darrylles@totalise.co.uk
There has got to be a better way to do this...What a hassle to bind it to a textbox to "interpret" it. No doubt it will work, but does anyone know of a better way? Maybe a script or something I could run on the table to convert all the -1's to 1's? I'm going to use this data piped to an Excel spreadsheet for calculations...this why it is so important. Thanks.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.