If using checkbox, how to show checkbox and value

F

forest8

Hi there

In my database, there are instances of checkbox usage. Is it possible to
have the checkbox and a "Yes/No" adjacent to the box?

That is, if the response is yes, I want to see a checkbox and Yes or if the
response is no, I want to see a blank box and No.

Thank you in advance.
 
T

Tokyo Alex

Hi,

You could put an unbound textbox on the form in the appropriate place and
set its controlsource to:
=IIf(chkCheckbox = -1,"YES","NO")

Hope this helps,
Alex.
 
G

Gina Whipp

Forest8,

In an unbound text box place...

=IIf([YourCheckboxName] = True, "Yes","")

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

Hi there

In my database, there are instances of checkbox usage. Is it possible to
have the checkbox and a "Yes/No" adjacent to the box?

That is, if the response is yes, I want to see a checkbox and Yes or if the
response is no, I want to see a blank box and No.

Thank you in advance.
 
A

Al Campagna

forest,
You wrote...
That is, if the response is yes, I want to see a checkbox and Yes or if
the
response is no, I want to see a blank box and No.
That's a bit confusing. Sounds like you want to respond somewhere
else on the form, and then have the checkbox checked/unchecked, and also
Yes/No accordingly.
With a checkbox, checking/unchecking the box itself should be the only
response needed.

I think you mean...
"When I check the checkbox, I want to see the word "Yes" right next to
it. And, when I uncheck the box, I want to see "No" right beside it."

Place an unbound text control next to your checkbox.
Give it a Control Source of...
= IIf([chkYourName] = True, "Yes", "No")
As chkYourName is checked/unchecked, "Yes" and "No" will dsiplay
accordingly.
--
hth
Al Campagna
Microsoft Access MVP 2007-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
D

Duane Hookom

You can just add a text box bound to the yes/no field and set the format
property to display yes/no. There is no need for IIf() expressions. If you
want the text box to be read-only, set its Locked property to Yes and
Enabled to No.
 
F

forest8

Thanks to everyone who responded to my query.

Al Campagna said:
forest,
You wrote...
That is, if the response is yes, I want to see a checkbox and Yes or if
the
response is no, I want to see a blank box and No.
That's a bit confusing. Sounds like you want to respond somewhere
else on the form, and then have the checkbox checked/unchecked, and also
Yes/No accordingly.
With a checkbox, checking/unchecking the box itself should be the only
response needed.

I think you mean...
"When I check the checkbox, I want to see the word "Yes" right next to
it. And, when I uncheck the box, I want to see "No" right beside it."

Place an unbound text control next to your checkbox.
Give it a Control Source of...
= IIf([chkYourName] = True, "Yes", "No")
As chkYourName is checked/unchecked, "Yes" and "No" will dsiplay
accordingly.
--
hth
Al Campagna
Microsoft Access MVP 2007-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

forest8 said:
Hi there

In my database, there are instances of checkbox usage. Is it possible to
have the checkbox and a "Yes/No" adjacent to the box?

That is, if the response is yes, I want to see a checkbox and Yes or if
the
response is no, I want to see a blank box and No.

Thank you in advance.


.
 

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