True/False calculation converted to checkbox?

B

BlueWolverine

Hello,
MS ACCESS 2003 on XP PRO.

I have a query that calculates whether or not something is present in a
table, and returns a True or a False.

Then a form reads this results (through an additional query) and display it
for that record. (the form is columnar).

I want the form to display the data as a check box instead of a text box
with a -1 or a 0. Quite frankly, I'd like the query to store it as a check
box instead of the number,

Any way to do this? or do I need an update query to fix a check box in the
table? That strikes me as a very 1930's way of doing this.
 
D

Dirk Goldgar

BlueWolverine said:
Hello,
MS ACCESS 2003 on XP PRO.

I have a query that calculates whether or not something is present in a
table, and returns a True or a False.

Then a form reads this results (through an additional query) and display
it
for that record. (the form is columnar).

I want the form to display the data as a check box instead of a text box
with a -1 or a 0. Quite frankly, I'd like the query to store it as a
check
box instead of the number,

Any way to do this? or do I need an update query to fix a check box in the
table? That strikes me as a very 1930's way of doing this.


Tables do not store check boxes, and there isn't really any such thing as a
"checkbox field". Usually, it is a boolean (Yes/No) field that is actually
storing the data. Check boxes are a display mechanism, nothing more. In
table and query design view, it possible to specify the "Display Control"
for a particular field as a check box, so that when you open the table or
query as a datasheet, that's what you get.

On a form, what type of control is bound to any field on the form is
entirely up to you. To change the control currently used for the field, you
must open your form in design view. Then you *may* be able to right-click
on the text box that is currently bound to the field in question, choose
"Change To", and select "Check Box".

However, that option may not be available. If it isn't, just delete the
text box, add a check box from the controls toolbar, and specify the field
name as the Control Source property of the check box.
 
G

Golfinray

If you put yes/no (binary) fields in your tables they should show up as
checkboxes. Then you should be able to put check boxes on your form and make
the control source of the checkbox the yes no field and get a yes or a no.
Another option is to put in your query:
IIF([yourfield]=-1,"yes","no")
 
B

BlueWolverine

Works wells thank you!!!!!
--
BlueWolverine
MSE - Mech. Eng.
Go BLUE!


Golfinray said:
If you put yes/no (binary) fields in your tables they should show up as
checkboxes. Then you should be able to put check boxes on your form and make
the control source of the checkbox the yes no field and get a yes or a no.
Another option is to put in your query:
IIF([yourfield]=-1,"yes","no")

BlueWolverine said:
Hello,
MS ACCESS 2003 on XP PRO.

I have a query that calculates whether or not something is present in a
table, and returns a True or a False.

Then a form reads this results (through an additional query) and display it
for that record. (the form is columnar).

I want the form to display the data as a check box instead of a text box
with a -1 or a 0. Quite frankly, I'd like the query to store it as a check
box instead of the number,

Any way to do this? or do I need an update query to fix a check box in the
table? That strikes me as a very 1930's way of doing this.
 

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