Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / August 2007

Tip: Looking for answers? Try searching our database.

Formatting Check boxes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Owl Lover - 31 Aug 2007 19:32 GMT
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
fredg - 31 Aug 2007 19:46 GMT
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

> Hi everyone,
>
[quoted text clipped - 14 lines]
>
> Owl Lover
Pieter Wijnen - 31 Aug 2007 20:09 GMT
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

> Hi everyone,
>
[quoted text clipped - 18 lines]
>
> Owl Lover
Ken Sheridan - 31 Aug 2007 21:20 GMT
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

> Hi everyone,
>
[quoted text clipped - 14 lines]
>
> Owl Lover
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.