YES OR NO VALIDATION RULE

G

Guest

In Access 2003, I am simply trying to create a few fields in which the only
data that can be entered into the field is "yes" or "no". I am hoping to do
this through my database field properties. (bound). For example, an employee
needs to know if there is signage at a job site, a Yes in that field can then
be later used to create a report of all the yes answers, so he can go to
those jobsites and pick up the signs.(Obviously, am new to Access). Thank
you for your help and patience.
June27
 
R

Rick Brandt

June27 said:
In Access 2003, I am simply trying to create a few fields in which
the only data that can be entered into the field is "yes" or "no". I
am hoping to do this through my database field properties. (bound).
For example, an employee needs to know if there is signage at a job
site, a Yes in that field can then be later used to create a report
of all the yes answers, so he can go to those jobsites and pick up
the signs.(Obviously, am new to Access). Thank you for your help and
patience.
June27

Any reason you don't just use the Yes/No DataType?
 
R

Rick Brandt

June27 said:
I am not familiar with the Yes/no data type. Can you direct me?

In Table design view select a field and look at the choices offered for the data
type. Yes/No is one of them. It stores -1 for True (Yes) and 0 for False (No).
It is often displayed as a CheckBox in forms, but on reports it can be formatted
to show "True/False", "Yes/No", etc..
 
G

Guest

You can have it to display more by using an Iif statement --
Iif([YourYesNoField]= -1,"Signs on-site", "Pick up signs for site")
 
R

Rick Brandt

KARL said:
You can have it to display more by using an Iif statement --
Iif([YourYesNoField]= -1,"Signs on-site", "Pick up signs for site")

No need for that. The format property can be used for any two text outputs.
For your example one would use a format of...

;"Pick up signs for site";"Signs on-site"
 
G

Guest

Thanks for the info.,works like a charm. Table did display checkboxes as you
said it probably would so I also formatted my forms with (bound) checkboxes.
Very helpful post, thanks again.
June

Rick Brandt said:
KARL said:
You can have it to display more by using an Iif statement --
Iif([YourYesNoField]= -1,"Signs on-site", "Pick up signs for site")

No need for that. The format property can be used for any two text outputs.
For your example one would use a format of...

;"Pick up signs for site";"Signs on-site"
 

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