A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Another Question about "How do I add "Yes" to checkbox"!



 
 
Thread Tools Display Modes
  #1  
Old January 27th, 2005, 05:29 PM
jimmy dean
external usenet poster
 
Posts: n/a
Default Another Question about "How do I add "Yes" to checkbox"!

Following on from my earlier post...I have encountered a small problem! When
you click the checkbox it enters "yes" in the textbox as requested...but...it
enters "yes" for all records at once!! I want it to only enter "yes" for each
unique record if it is checked and not enter "yes" for them all. What extra
piece of code do I need?

Thanks again!
  #2  
Old January 27th, 2005, 06:41 PM
AlCamp
external usenet poster
 
Posts: n/a
Default

Jimmy,
Your Textbox should be a calculated value that reflects the value
selected in the CheckBox. Right now you probably are using an "unbound"
TextBox so what you put in that field is seen on all records.

Since you have a bound CheckBox to capture the Yes or No value, the
TextBox should only "display" Yes or No in response to those CheckBox
selections.

Remove any code with your CheckBox that sets the value of the TextBox...
there's no need to do that.

Make the TextBox a "calculated" control.
Place this ControlSource in your TextBox... use your own names...

= IIF([YourCheckBox] = True, "Yes", "No")

As you Click/Unclick your Checkbox, the TextBox will always reflect the
proper Yes or No, and each record should display the correct value according
to it's CheckBox value.
hth
Al Camp



"jimmy dean" wrote in message
...
Following on from my earlier post...I have encountered a small problem!
When
you click the checkbox it enters "yes" in the textbox as
requested...but...it
enters "yes" for all records at once!! I want it to only enter "yes" for
each
unique record if it is checked and not enter "yes" for them all. What
extra
piece of code do I need?

Thanks again!



  #3  
Old January 27th, 2005, 06:43 PM
Bruce M. Thompson
external usenet poster
 
Posts: n/a
Default

Following on from my earlier post...I have encountered a small problem! When
you click the checkbox it enters "yes" in the textbox as requested...but...it
enters "yes" for all records at once!! I want it to only enter "yes" for each
unique record if it is checked and not enter "yes" for them all. What extra
piece of code do I need?


This will not work the way you want it to unless the checkbox is bound to a
field in the form's recordsource. Is that checkbox bound to such a field (the
checkbox's "Control Source" property will contain the name of a field from the
form's recordsource)?

--
Bruce M. Thompson, Microsoft Access MVP
(See the Access FAQ at http://www.mvps.org/access)
NO Email Please. Keep all communications

within the newsgroups so that all might benefit.


  #4  
Old January 27th, 2005, 07:33 PM
jimmy dean
external usenet poster
 
Posts: n/a
Default

In my checkbox's properties, the Control field is empty, not bound to anything.
The "=True..Yes No" solution already posted here is not resolving my
problem. All my records still show as being "checked" whenever you check one
of them. They do show "Yes" or "No" according to if you have them checked or
not...but it affects all records still!
Any further ideas guys?!

Thanks

"Bruce M. Thompson" wrote:

Following on from my earlier post...I have encountered a small problem! When
you click the checkbox it enters "yes" in the textbox as requested...but...it
enters "yes" for all records at once!! I want it to only enter "yes" for each
unique record if it is checked and not enter "yes" for them all. What extra
piece of code do I need?


This will not work the way you want it to unless the checkbox is bound to a
field in the form's recordsource. Is that checkbox bound to such a field (the
checkbox's "Control Source" property will contain the name of a field from the
form's recordsource)?

--
Bruce M. Thompson, Microsoft Access MVP
(See the Access FAQ at http://www.mvps.org/access)
NO Email Please. Keep all communications

within the newsgroups so that all might benefit.



  #5  
Old January 27th, 2005, 07:39 PM
Rick B
external usenet poster
 
Posts: n/a
Default

As he previously stated, your checkbox must be bound to the record. It must
be a field in your table.

If you have ten records and you check records 1, 4, and 7 how would access
"remember" that if it did not store the value in the table?

Yesterday I told you that your DISPLAY field must be unbound, not the
checkbox field.



Rick B


"jimmy dean" wrote in message
news
In my checkbox's properties, the Control field is empty, not bound to

anything.
The "=True..Yes No" solution already posted here is not resolving my
problem. All my records still show as being "checked" whenever you check

one
of them. They do show "Yes" or "No" according to if you have them checked

or
not...but it affects all records still!
Any further ideas guys?!

Thanks

"Bruce M. Thompson" wrote:

Following on from my earlier post...I have encountered a small

problem! When
you click the checkbox it enters "yes" in the textbox as

requested...but...it
enters "yes" for all records at once!! I want it to only enter "yes"

for each
unique record if it is checked and not enter "yes" for them all. What

extra
piece of code do I need?


This will not work the way you want it to unless the checkbox is bound

to a
field in the form's recordsource. Is that checkbox bound to such a field

(the
checkbox's "Control Source" property will contain the name of a field

from the
form's recordsource)?

--
Bruce M. Thompson, Microsoft Access MVP
(See the Access FAQ at http://www.mvps.org/access)
NO Email Please. Keep all communications

within the newsgroups so that all might benefit.





  #6  
Old January 27th, 2005, 07:52 PM
AlCamp
external usenet poster
 
Posts: n/a
Default

Jimmy,
I agree with Bruce, and my solution took it for granted that your
CheckBox was "bound" to a field in the table, and that the TextBox was only
to "dislplay" the word "Yes" or "No" as a visual aid to the user.
From what I can tell right now, your CheckBox and the Textbox are BOTH
unbound, so that whatever you check will show in all records, and whatever
you enter in the TextBox will show on all records. In other words you have
an unbound checkbox updating the value of an unbound textbox.

I think you need to take a moment to describe... in detail... what you are
trying to accomplish, what controls you have now, and what code you have at
this time.

hth
Al Camp

"jimmy dean" wrote in message
news
In my checkbox's properties, the Control field is empty, not bound to
anything.
The "=True..Yes No" solution already posted here is not resolving my
problem. All my records still show as being "checked" whenever you check
one
of them. They do show "Yes" or "No" according to if you have them checked
or
not...but it affects all records still!
Any further ideas guys?!

Thanks

"Bruce M. Thompson" wrote:

Following on from my earlier post...I have encountered a small problem!
When
you click the checkbox it enters "yes" in the textbox as
requested...but...it
enters "yes" for all records at once!! I want it to only enter "yes"
for each
unique record if it is checked and not enter "yes" for them all. What
extra
piece of code do I need?


This will not work the way you want it to unless the checkbox is bound to
a
field in the form's recordsource. Is that checkbox bound to such a field
(the
checkbox's "Control Source" property will contain the name of a field
from the
form's recordsource)?

--
Bruce M. Thompson, Microsoft Access MVP
(See the Access FAQ at http://www.mvps.org/access)
NO Email Please. Keep all communications

within the newsgroups so that all might benefit.





  #7  
Old January 27th, 2005, 09:42 PM
John Vinson
external usenet poster
 
Posts: n/a
Default

On Thu, 27 Jan 2005 09:29:03 -0800, "jimmy dean"
wrote:

Following on from my earlier post...I have encountered a small problem! When
you click the checkbox it enters "yes" in the textbox as requested...but...it
enters "yes" for all records at once!! I want it to only enter "yes" for each
unique record if it is checked and not enter "yes" for them all. What extra
piece of code do I need?

Thanks again!


I'm *GUESSING* that what you want is to have a checkbox and a textbox,
*both* bound to the same Yes/No field in your Table. Try setting the
controls as follows:

Checkbox
Enabled = Yes
TabStop = Yes

Textbox
Enabled = No
Locked = Yes
Format = Yes/No
TabStop = No


John W. Vinson[MVP]
  #8  
Old January 28th, 2005, 06:07 AM
jimmy dean
external usenet poster
 
Posts: n/a
Default

Ok guys here is what I am trying to do with the database...I have 3 different
checkboxes and text boxes contained within a form. I need for each texbox to
show "Yes" whenever the checkbox beside it is clicked e.g. I have a field
named "Complete" that contains a checkbox and a text box and when the empty
checkbox is checked "Yes" appears beside it or "No" if you don't check
it!(it doesn't have to show "No"..blank is fine also)
Currently when you check the box "Yes" appears...but...it also checks and
shows "Yes" for each record! I have about 1100 records and I don't want all
of them showing up complete in an instant! I need for each record to be
independent i.e. not every record may be "checked" complete!

So that is what I need...here is what I have currently code wise...
Textbox name - Text69...Control source - =IIf([Yes]=True,"Yes","No")...All
Event fields are blank
Checkbox name - Yes...Control source - (blank)...All event fields are blank.

This is possibly my problem?..I do not have any field in my table with
"Yes/No" linked to the form. Where do I need to put this field/column and
what should it contain or be linked to...if in fact this is my problem?!

Let me know if you need any more details!

All help/ideas welcome!

Thanks again guys!



"AlCamp" wrote:

Jimmy,
I agree with Bruce, and my solution took it for granted that your
CheckBox was "bound" to a field in the table, and that the TextBox was only
to "dislplay" the word "Yes" or "No" as a visual aid to the user.
From what I can tell right now, your CheckBox and the Textbox are BOTH
unbound, so that whatever you check will show in all records, and whatever
you enter in the TextBox will show on all records. In other words you have
an unbound checkbox updating the value of an unbound textbox.

I think you need to take a moment to describe... in detail... what you are
trying to accomplish, what controls you have now, and what code you have at
this time.

hth
Al Camp

"jimmy dean" wrote in message
news
In my checkbox's properties, the Control field is empty, not bound to
anything.
The "=True..Yes No" solution already posted here is not resolving my
problem. All my records still show as being "checked" whenever you check
one
of them. They do show "Yes" or "No" according to if you have them checked
or
not...but it affects all records still!
Any further ideas guys?!

Thanks

"Bruce M. Thompson" wrote:

Following on from my earlier post...I have encountered a small problem!
When
you click the checkbox it enters "yes" in the textbox as
requested...but...it
enters "yes" for all records at once!! I want it to only enter "yes"
for each
unique record if it is checked and not enter "yes" for them all. What
extra
piece of code do I need?

This will not work the way you want it to unless the checkbox is bound to
a
field in the form's recordsource. Is that checkbox bound to such a field
(the
checkbox's "Control Source" property will contain the name of a field
from the
form's recordsource)?

--
Bruce M. Thompson, Microsoft Access MVP
(See the Access FAQ at http://www.mvps.org/access)
NO Email Please. Keep all communications
within the newsgroups so that all might benefit.






  #9  
Old January 28th, 2005, 01:59 PM
AlCamp
external usenet poster
 
Posts: n/a
Default

Jimmy,
You've got to read and follow the advice in our responses!
Three people have told you that the Checkbox MUST BE "BOUND" to a field
in your table in order for it to "hold" the proper value for each record in
your database.

Just forget about the textboxes right now... let's just get the Checkbox
to work properly.

For example...
If I had a database of automobiles, in my table design I'd have a field
called [CDPlayer], and I'd make it a Yes/No field.
On my data entry form I'd place a checkbox called CDPlayer with a
ControlSource of ...
= [CDPlayer].
If a car has a CD Player, I check CDPlayer, if it doesn't I leave it
unchecked. But... because the CDPlayer Checkbox is "BOUND" to a field in
my table, each record can store and retain it's own unique value.

If you have a Checkbox called Complete, it MUST be "bound" to a Yes/No
field in your table called [Complete], or [Done], [NoMoreWorkNeeded]... or
whatever you want to call it.
hth
Al Camp

"jimmy dean" wrote in message
...
Ok guys here is what I am trying to do with the database...I have 3
different
checkboxes and text boxes contained within a form. I need for each texbox
to
show "Yes" whenever the checkbox beside it is clicked e.g. I have a field
named "Complete" that contains a checkbox and a text box and when the
empty
checkbox is checked "Yes" appears beside it or "No" if you don't check
it!(it doesn't have to show "No"..blank is fine also)
Currently when you check the box "Yes" appears...but...it also checks and
shows "Yes" for each record! I have about 1100 records and I don't want
all
of them showing up complete in an instant! I need for each record to be
independent i.e. not every record may be "checked" complete!

So that is what I need...here is what I have currently code wise...
Textbox name - Text69...Control source - =IIf([Yes]=True,"Yes","No")...All
Event fields are blank
Checkbox name - Yes...Control source - (blank)...All event fields are
blank.

This is possibly my problem?..I do not have any field in my table with
"Yes/No" linked to the form. Where do I need to put this field/column and
what should it contain or be linked to...if in fact this is my problem?!

Let me know if you need any more details!

All help/ideas welcome!

Thanks again guys!



"AlCamp" wrote:

Jimmy,
I agree with Bruce, and my solution took it for granted that your
CheckBox was "bound" to a field in the table, and that the TextBox was
only
to "dislplay" the word "Yes" or "No" as a visual aid to the user.
From what I can tell right now, your CheckBox and the Textbox are BOTH
unbound, so that whatever you check will show in all records, and
whatever
you enter in the TextBox will show on all records. In other words you
have
an unbound checkbox updating the value of an unbound textbox.

I think you need to take a moment to describe... in detail... what you
are
trying to accomplish, what controls you have now, and what code you have
at
this time.

hth
Al Camp

"jimmy dean" wrote in message
news
In my checkbox's properties, the Control field is empty, not bound to
anything.
The "=True..Yes No" solution already posted here is not resolving my
problem. All my records still show as being "checked" whenever you
check
one
of them. They do show "Yes" or "No" according to if you have them
checked
or
not...but it affects all records still!
Any further ideas guys?!

Thanks

"Bruce M. Thompson" wrote:

Following on from my earlier post...I have encountered a small
problem!
When
you click the checkbox it enters "yes" in the textbox as
requested...but...it
enters "yes" for all records at once!! I want it to only enter "yes"
for each
unique record if it is checked and not enter "yes" for them all.
What
extra
piece of code do I need?

This will not work the way you want it to unless the checkbox is bound
to
a
field in the form's recordsource. Is that checkbox bound to such a
field
(the
checkbox's "Control Source" property will contain the name of a field
from the
form's recordsource)?

--
Bruce M. Thompson, Microsoft Access MVP
(See the Access FAQ at http://www.mvps.org/access)
NO Email Please. Keep all communications
within the newsgroups so that all might benefit.








  #10  
Old January 28th, 2005, 04:15 PM
jimmy dean
external usenet poster
 
Posts: n/a
Default

I have changed my Complete field in the table to a "Yes/No" format and then
entered =[Complete]as the control source for the checkbox.
Now it will not let me check the box in my Form because it says "Control
can't be edited. It's bound to the expression Complete"! I even made a new
field with a Yes/No format and tried linking to that just in case the
previous one had a naming conflict...but I get the same error mesage!

"AlCamp" wrote:

Jimmy,
You've got to read and follow the advice in our responses!
Three people have told you that the Checkbox MUST BE "BOUND" to a field
in your table in order for it to "hold" the proper value for each record in
your database.

Just forget about the textboxes right now... let's just get the Checkbox
to work properly.

For example...
If I had a database of automobiles, in my table design I'd have a field
called [CDPlayer], and I'd make it a Yes/No field.
On my data entry form I'd place a checkbox called CDPlayer with a
ControlSource of ...
= [CDPlayer].
If a car has a CD Player, I check CDPlayer, if it doesn't I leave it
unchecked. But... because the CDPlayer Checkbox is "BOUND" to a field in
my table, each record can store and retain it's own unique value.

If you have a Checkbox called Complete, it MUST be "bound" to a Yes/No
field in your table called [Complete], or [Done], [NoMoreWorkNeeded]... or
whatever you want to call it.
hth
Al Camp

"jimmy dean" wrote in message
...
Ok guys here is what I am trying to do with the database...I have 3
different
checkboxes and text boxes contained within a form. I need for each texbox
to
show "Yes" whenever the checkbox beside it is clicked e.g. I have a field
named "Complete" that contains a checkbox and a text box and when the
empty
checkbox is checked "Yes" appears beside it or "No" if you don't check
it!(it doesn't have to show "No"..blank is fine also)
Currently when you check the box "Yes" appears...but...it also checks and
shows "Yes" for each record! I have about 1100 records and I don't want
all
of them showing up complete in an instant! I need for each record to be
independent i.e. not every record may be "checked" complete!

So that is what I need...here is what I have currently code wise...
Textbox name - Text69...Control source - =IIf([Yes]=True,"Yes","No")...All
Event fields are blank
Checkbox name - Yes...Control source - (blank)...All event fields are
blank.

This is possibly my problem?..I do not have any field in my table with
"Yes/No" linked to the form. Where do I need to put this field/column and
what should it contain or be linked to...if in fact this is my problem?!

Let me know if you need any more details!

All help/ideas welcome!

Thanks again guys!



"AlCamp" wrote:

Jimmy,
I agree with Bruce, and my solution took it for granted that your
CheckBox was "bound" to a field in the table, and that the TextBox was
only
to "dislplay" the word "Yes" or "No" as a visual aid to the user.
From what I can tell right now, your CheckBox and the Textbox are BOTH
unbound, so that whatever you check will show in all records, and
whatever
you enter in the TextBox will show on all records. In other words you
have
an unbound checkbox updating the value of an unbound textbox.

I think you need to take a moment to describe... in detail... what you
are
trying to accomplish, what controls you have now, and what code you have
at
this time.

hth
Al Camp

"jimmy dean" wrote in message
news In my checkbox's properties, the Control field is empty, not bound to
anything.
The "=True..Yes No" solution already posted here is not resolving my
problem. All my records still show as being "checked" whenever you
check
one
of them. They do show "Yes" or "No" according to if you have them
checked
or
not...but it affects all records still!
Any further ideas guys?!

Thanks

"Bruce M. Thompson" wrote:

Following on from my earlier post...I have encountered a small
problem!
When
you click the checkbox it enters "yes" in the textbox as
requested...but...it
enters "yes" for all records at once!! I want it to only enter "yes"
for each
unique record if it is checked and not enter "yes" for them all.
What
extra
piece of code do I need?

This will not work the way you want it to unless the checkbox is bound
to
a
field in the form's recordsource. Is that checkbox bound to such a
field
(the
checkbox's "Control Source" property will contain the name of a field
from the
form's recordsource)?

--
Bruce M. Thompson, Microsoft Access MVP
(See the Access FAQ at http://www.mvps.org/access)
NO Email Please. Keep all communications
within the newsgroups so that all might benefit.









 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
whats a good way to start a paragraph with a question in mind.. kr33p3r General Discussion 2 September 2nd, 2004 10:59 PM
checkbox question GamerGoat General Discussion 1 August 31st, 2004 06:19 PM
Office 2000 --General Question ANa General Discussions 2 August 27th, 2004 09:55 AM
Designing a question paper Ken New Users 2 April 28th, 2004 10:13 PM
Cells as checkbox-3rd Question Beth Worksheet Functions 3 February 25th, 2004 04:04 PM


All times are GMT +1. The time now is 06:33 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.