How do I add the message "Yes" when a checkbox is clicked?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I add the message "Yes" when a checkbox is clicked? I need it to show
beside/as part of the checkbox i.e. in the textbox that is part of the
checkbox. I do not want "Yes" to be displayed unless the box is checked.
Thank you in advance!
 
Just add an unbound field and put an if statement in it.


=IIf([SomeField],"yes","")




Hope that helps,

Rick B
 
Checkbox name = A

if the data source is a query you can add this to the
query;

AA:iif([A]=-1,"Yes","")

and link the text box to field name "AA" instead of " A "

or you can add this to the text box directly;

=iif([A]=-1,"Yes","")




-----Original Message-----
Just add an unbound field and put an if statement in it.


=IIf([SomeField],"yes","")




Hope that helps,

Rick B


How do I add the message "Yes" when a checkbox is
clicked? I need it to
show
beside/as part of the checkbox i.e. in the textbox that is part of the
checkbox. I do not want "Yes" to be displayed unless the box is checked.
Thank you in advance!


.
 
Thanks so far for the help...but...I am not having any luck!
I know I am missing something that I should be doing...where excactly should
I add the field and what other steps do I need to take? I have tried putting
in the field name = A in the properties box of the checkbox & then adding the
text string directly in the text box...but all that happened was when you go
back to form view...you can see the string?!! More detailed help needed guys
please!

Thanks again!

Wasi Khan said:
Checkbox name = A

if the data source is a query you can add this to the
query;

AA:iif([A]=-1,"Yes","")

and link the text box to field name "AA" instead of " A "

or you can add this to the text box directly;

=iif([A]=-1,"Yes","")




-----Original Message-----
Just add an unbound field and put an if statement in it.


=IIf([SomeField],"yes","")




Hope that helps,

Rick B


How do I add the message "Yes" when a checkbox is
clicked? I need it to
show
beside/as part of the checkbox i.e. in the textbox that is part of the
checkbox. I do not want "Yes" to be displayed unless the box is checked.
Thank you in advance!


.
 
Just add an unbound text box to your form. Don't worry about the name or
any other property. Click on the field and enter...

=IIf([SomeField],"yes","")


of course, you will replace "somefield" with the checkbox field you wish to
evaluate.



Place this new unbound control next to your checkbox on the form.

Hope that helps,


Rick B




jimmy dean said:
Thanks so far for the help...but...I am not having any luck!
I know I am missing something that I should be doing...where excactly should
I add the field and what other steps do I need to take? I have tried putting
in the field name = A in the properties box of the checkbox & then adding the
text string directly in the text box...but all that happened was when you go
back to form view...you can see the string?!! More detailed help needed guys
please!

Thanks again!

Wasi Khan said:
Checkbox name = A

if the data source is a query you can add this to the
query;

AA:iif([A]=-1,"Yes","")

and link the text box to field name "AA" instead of " A "

or you can add this to the text box directly;

=iif([A]=-1,"Yes","")




-----Original Message-----
Just add an unbound field and put an if statement in it.


=IIf([SomeField],"yes","")




Hope that helps,

Rick B


news:2EB5B196-4119-44DC-9303- (e-mail address removed)...
How do I add the message "Yes" when a checkbox is clicked? I need it to
show
beside/as part of the checkbox i.e. in the textbox that is part of the
checkbox. I do not want "Yes" to be displayed unless the box is checked.
Thank you in advance!


.
 
Ok...here is where I am at!, Rick...after tinkering around with the code...I
have now got the text box beside the checkbox with "Yes" in it...problem
is..."Yes" is there all the time, doesn't matter if you check the box or not!
Any ideas as to how to make it work in tandem with people "checking the box'?!

Thanks!

Rick B said:
Just add an unbound text box to your form. Don't worry about the name or
any other property. Click on the field and enter...

=IIf([SomeField],"yes","")


of course, you will replace "somefield" with the checkbox field you wish to
evaluate.



Place this new unbound control next to your checkbox on the form.

Hope that helps,


Rick B




jimmy dean said:
Thanks so far for the help...but...I am not having any luck!
I know I am missing something that I should be doing...where excactly should
I add the field and what other steps do I need to take? I have tried putting
in the field name = A in the properties box of the checkbox & then adding the
text string directly in the text box...but all that happened was when you go
back to form view...you can see the string?!! More detailed help needed guys
please!

Thanks again!

Wasi Khan said:
Checkbox name = A

if the data source is a query you can add this to the
query;

AA:iif([A]=-1,"Yes","")

and link the text box to field name "AA" instead of " A "

or you can add this to the text box directly;

=iif([A]=-1,"Yes","")





-----Original Message-----
Just add an unbound field and put an if statement in it.


=IIf([SomeField],"yes","")




Hope that helps,

Rick B


"jimmy dean" <jimmy (e-mail address removed)>
wrote in message
(e-mail address removed)...
How do I add the message "Yes" when a checkbox is
clicked? I need it to
show
beside/as part of the checkbox i.e. in the textbox
that is part of the
checkbox. I do not want "Yes" to be displayed unless
the box is checked.
Thank you in advance!


.
 
You would have to identify what condition "SomeField" would be in to get it
to work though. The IIF statement works like this:

IIF(If this part is true, then do this, if not then do this)

So you want to enter this in your Control Source for the text box you just
entered for the tick mark:

=IIF([MyCheckboxFieldName]=-1,"Your checkmark character","")

So it's saying if your checkbox field is checked (the table stores it as -1)
then show the tick mark, if it isn't then don't display anything.



Rick B said:
Just add an unbound text box to your form. Don't worry about the name or
any other property. Click on the field and enter...

=IIf([SomeField],"yes","")


of course, you will replace "somefield" with the checkbox field you wish to
evaluate.



Place this new unbound control next to your checkbox on the form.

Hope that helps,


Rick B




jimmy dean said:
Thanks so far for the help...but...I am not having any luck!
I know I am missing something that I should be doing...where excactly should
I add the field and what other steps do I need to take? I have tried putting
in the field name = A in the properties box of the checkbox & then adding the
text string directly in the text box...but all that happened was when you go
back to form view...you can see the string?!! More detailed help needed guys
please!

Thanks again!

Wasi Khan said:
Checkbox name = A

if the data source is a query you can add this to the
query;

AA:iif([A]=-1,"Yes","")

and link the text box to field name "AA" instead of " A "

or you can add this to the text box directly;

=iif([A]=-1,"Yes","")





-----Original Message-----
Just add an unbound field and put an if statement in it.


=IIf([SomeField],"yes","")




Hope that helps,

Rick B


"jimmy dean" <jimmy (e-mail address removed)>
wrote in message
(e-mail address removed)...
How do I add the message "Yes" when a checkbox is
clicked? I need it to
show
beside/as part of the checkbox i.e. in the textbox
that is part of the
checkbox. I do not want "Yes" to be displayed unless
the box is checked.
Thank you in advance!


.
 
At Last!!!

Thank you "rowiga"!! You had the final piece to the puzzle! It now works
just the way I want it!

Thanks for all your help guys!



rowiga said:
You would have to identify what condition "SomeField" would be in to get it
to work though. The IIF statement works like this:

IIF(If this part is true, then do this, if not then do this)

So you want to enter this in your Control Source for the text box you just
entered for the tick mark:

=IIF([MyCheckboxFieldName]=-1,"Your checkmark character","")

So it's saying if your checkbox field is checked (the table stores it as -1)
then show the tick mark, if it isn't then don't display anything.



Rick B said:
Just add an unbound text box to your form. Don't worry about the name or
any other property. Click on the field and enter...

=IIf([SomeField],"yes","")


of course, you will replace "somefield" with the checkbox field you wish to
evaluate.



Place this new unbound control next to your checkbox on the form.

Hope that helps,


Rick B




jimmy dean said:
Thanks so far for the help...but...I am not having any luck!
I know I am missing something that I should be doing...where excactly should
I add the field and what other steps do I need to take? I have tried putting
in the field name = A in the properties box of the checkbox & then adding the
text string directly in the text box...but all that happened was when you go
back to form view...you can see the string?!! More detailed help needed guys
please!

Thanks again!

:

Checkbox name = A

if the data source is a query you can add this to the
query;

AA:iif([A]=-1,"Yes","")

and link the text box to field name "AA" instead of " A "

or you can add this to the text box directly;

=iif([A]=-1,"Yes","")





-----Original Message-----
Just add an unbound field and put an if statement in it.


=IIf([SomeField],"yes","")




Hope that helps,

Rick B


"jimmy dean" <jimmy (e-mail address removed)>
wrote in message
(e-mail address removed)...
How do I add the message "Yes" when a checkbox is
clicked? I need it to
show
beside/as part of the checkbox i.e. in the textbox
that is part of the
checkbox. I do not want "Yes" to be displayed unless
the box is checked.
Thank you in advance!


.
 
Back
Top