Formatting Check boxes

O

Owl Lover

Hi everyone,

I'm working on an input form (Access 2000-2003) and have some check boxes.
My question is, is it possible to set the check box to a text response rather
than a yes/no response? If so, can someone please walk me through how to do
it. For example, one is labeled "In-house Rejection" and if the box is
checked, they want the response on the table to be "In-house Rejection".
They want it this way because they run a In House Rejection report and use
that field to determine the rejections. I know it can still be done with a
Yes/No response, but I was just wondering if it could be done this way as
well.

This website has been invaluable to me, and I really appreciate all the help
I'm receiving!

Thank you,

Owl Lover
 
F

fredg

In the report, add an unbound text control to the report.
Set it's control source to the Check Box field.

Set it's Format Property to:
;"In-house Rejection";"Your unchecked response here";

For how this works, see
Format Property + Number and Currency datatypes
in Access help.

Fred
 
P

Pieter Wijnen

Simplest way
PreRequisites: IsRejected (hidden) Control bound to Field, RejectedShow
unbound textbox

In the detail section Format event of the report

Private Sub Report_Detail_Format(....)
If Me.IsRjected = True Then
Me.RejecteedShow.Value = "In-house Rejection"
Else
Me.RejecteedShow.Value=Null
End If
End Sub

Pieter
 
K

Ken Sheridan

If you want to have text values corresponding with a True or False Boolean
(Yes/No) value then the best approach is to include the text values in a
related table. In your case you'd have a table, RejectionCategories say,
with two columns, the first a Boolean column, the second a text column. This
table would have just two rows, the first having a True value in the first
column and "In-house Rejection" in the second column. The second row would
have a False value in the first column and whatever text you want for a False
value in the text column.

You can then base a report on a query which joins your current table to the
RejectionCategories table on the two Boolean columns, with the text column
from the RejectionCategories table returned in the query. This column can
then not only be used as the ControlSource of a bound control in the report
but can also be used to restrict the report in the way you want on the basis
of the text value rather than the Boolean value. I don't myself see any real
advantage in being able to do the latter; the real advantage of having the
text values in a table like this is that it allows for user maintenance
simply by amending the text values in the table. If you wanted to change the
wording from "In-house Rejection" to something else at any time its simply a
matter of editing one row in a table, whereas hard-coding the text
representation of the Boolean values would require a change to one or more
object definitions.

Another option would be to use a text column rather than a Boolean column in
your current table, relating the current table on this column to the
RejectionCategories table, which now would have just the one text column,
(making sure that referential integrity and cascade updates are enforced in
the relationship) and to use a combo box on the form rather than a check box,
the combo box drawing on the RejectionCategories table for its RowSource.

Ken Sheridan
Stafford, England
 

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