Checkbox Value Difference - Simple Question

E

Eric G

I have two checkboxes on my form. Other than different names, they are set
up exactly alike. When I check the values of the checkboxes (in the VBE
debugger), I see that one of them returns True/False as the value, and the
other returns -1/0 as the value.

What's up with that? Why the difference? I know that -1 = True and 0 =
False, so the actual value is not different, but the way it is displayed is
different.

Thanks,

Eric
 
M

Marshall Barton

Eric said:
I have two checkboxes on my form. Other than different names, they are set
up exactly alike. When I check the values of the checkboxes (in the VBE
debugger), I see that one of them returns True/False as the value, and the
other returns -1/0 as the value.

What's up with that? Why the difference? I know that -1 = True and 0 =
False, so the actual value is not different, but the way it is displayed is
different.


Who knows how Access/VBA decides to format things?

The only explainable(?) reason I can speculate about is that
one check box is bound to a True/False field and the other
is bound to some kind of a number field or is unbound.
 
M

Marshall Barton

Eric said:
I have two checkboxes on my form. Other than different names, they are set
up exactly alike. When I check the values of the checkboxes (in the VBE
debugger), I see that one of them returns True/False as the value, and the
other returns -1/0 as the value.

What's up with that? Why the difference? I know that -1 = True and 0 =
False, so the actual value is not different, but the way it is displayed is
different.


Who knows how Access/VBA decides to format things?

The only explainable(?) reason I can speculate about is that
one check box is bound to a True/False field and the other
is bound to some kind of a number field or is unbound.
 
E

Eric G

I should have said this in the beginning - none of the items on this form are
bound. The form is used for user inputs, which are then thoroughly scrubbed
for before they are used in an UPDATE query to the main data table.
Therefore these are just checkboxes on a form, not associated with any
specific field in the database.

Thanks for your response. I think I'll just work around the issue and not
worry about it any more!

Eric
 
E

Eric G

I should have said this in the beginning - none of the items on this form are
bound. The form is used for user inputs, which are then thoroughly scrubbed
for before they are used in an UPDATE query to the main data table.
Therefore these are just checkboxes on a form, not associated with any
specific field in the database.

Thanks for your response. I think I'll just work around the issue and not
worry about it any more!

Eric
 
M

Marshall Barton

Eric said:
I should have said this in the beginning - none of the items on this form are
bound. The form is used for user inputs, which are then thoroughly scrubbed
for before they are used in an UPDATE query to the main data table.
Therefore these are just checkboxes on a form, not associated with any
specific field in the database.

Thanks for your response. I think I'll just work around the issue and not
worry about it any more!


Not worrying about it is the most productive workaroound
;-)
 
M

Marshall Barton

Eric said:
I should have said this in the beginning - none of the items on this form are
bound. The form is used for user inputs, which are then thoroughly scrubbed
for before they are used in an UPDATE query to the main data table.
Therefore these are just checkboxes on a form, not associated with any
specific field in the database.

Thanks for your response. I think I'll just work around the issue and not
worry about it any more!


Not worrying about it is the most productive workaroound
;-)
 

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