Checkbox values

  • Thread starter Thread starter Paul Milner
  • Start date Start date
P

Paul Milner

Hi
Can a checkbox have any other value other than
yes/no /on/off etc. in other words can it be more
discriptive like if I had a form catagory called gender
and someone clicked the female checkbox can the
resulting entry in the table say female.
I would like this so when I do a query the result says
female instead of yes.
Or is it best done in the query SQL with some kind of
alias, if so how?
Thankyou
Paul M
 
Hi
Can a checkbox have any other value other than
yes/no /on/off etc. in other words can it be more
discriptive like if I had a form catagory called gender
and someone clicked the female checkbox can the
resulting entry in the table say female.
I would like this so when I do a query the result says
female instead of yes.
Or is it best done in the query SQL with some kind of
alias, if so how?
Thankyou
Paul M

Regarding >someone clicked the female checkbox <

Since the choices are either Male or Female, perhaps the field should
more correctly be called 'Gender' with a Check mark meaning female
and blank meaning male (or vice versa).

A Check Box value is either 0 or -1.
That is the value that is stored.
You can use an unbound control to display any text you wish, on a form
or in a report, instead of 0 or -1.

Use an unbound text control.
Set it's control source to the Check Box field.
Set it's Format property to:
;"Female";"Male"

In a query, you would create another column:
Gender:IIf([CheckBoxField]=-1,"Female","Male")
 
Thanks Fred
Re. the unbound control, where is the format property
option
Best wishes
Paul M
-----Original Message-----
Hi
Can a checkbox have any other value other than
yes/no /on/off etc. in other words can it be more
discriptive like if I had a form catagory called gender
and someone clicked the female checkbox can the
resulting entry in the table say female.
I would like this so when I do a query the result says
female instead of yes.
Or is it best done in the query SQL with some kind of
alias, if so how?
Thankyou
Paul M

Regarding >someone clicked the female checkbox <

Since the choices are either Male or Female, perhaps the field should
more correctly be called 'Gender' with a Check mark meaning female
and blank meaning male (or vice versa).

A Check Box value is either 0 or -1.
That is the value that is stored.
You can use an unbound control to display any text you wish, on a form
or in a report, instead of 0 or -1.

Use an unbound text control.
Set it's control source to the Check Box field.
Set it's Format property to:
;"Female";"Male"

In a query, you would create another column:
Gender:IIf([CheckBoxField]=-1,"Female","Male")

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
Thanks Fred
Re. the unbound control, where is the format property
option
Best wishes
Paul M
-----Original Message-----
Hi
Can a checkbox have any other value other than
yes/no /on/off etc. in other words can it be more
discriptive like if I had a form catagory called gender
and someone clicked the female checkbox can the
resulting entry in the table say female.
I would like this so when I do a query the result says
female instead of yes.
Or is it best done in the query SQL with some kind of
alias, if so how?
Thankyou
Paul M

Regarding >someone clicked the female checkbox <

Since the choices are either Male or Female, perhaps the field should
more correctly be called 'Gender' with a Check mark meaning female
and blank meaning male (or vice versa).

A Check Box value is either 0 or -1.
That is the value that is stored.
You can use an unbound control to display any text you wish, on a form
or in a report, instead of 0 or -1.

Use an unbound text control.
Set it's control source to the Check Box field.
Set it's Format property to:
;"Female";"Male"

In a query, you would create another column:
Gender:IIf([CheckBoxField]=-1,"Female","Male")

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.

Same place it is on a bound text control.
Display the control's property sheet.
Click on the Format tab.
It's the first property.
 
Back
Top