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 / Reports / Printing / October 2004

Tip: Looking for answers? Try searching our database.

settign unbound checkboxes based on text field entry

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Richard - 27 Oct 2004 23:19 GMT
On my report, I have 4 unbound checkboxes. But I would like to have them
either be checked (true) or unchecked (false) based on data entered in
specific text fields.

What I mean is checkbox #1 is either checked or unchecked based on a text
field which is titled LOCATION. In LOCATION, there are two list items to
chose from; "In" and "Out". If the data is set to "Out", I want this checkbox
checked. If its set to "In", I want the checkbox blank, or false

On checkbox #2, I an checking a date field titled DATE_LOANED. If the field
has a date in it, I want the checkbox to be checked. If there is no date, I
want the checkbox unchecked.

Checkbox #3 is like #2, only I am looking at a regular text field
CLAIM_NUMBER instead of a date field.

Checkbox #4 is looking at a FIRST_NAME field. If the field has the word
"OTC", then I want the checkbox checked. Otherwise, anything else would have
the checkbox unchecled.

I tried this line of code for the first checkbox:

If Me.Location = "Out" Then Me.CheckboxName = True
But all this did was make the checkbox checked, regardless if the field was
set to "In" or "Out".

I've asked questions in the past and find that everyone here has been a
tremendous amount of help. I'd appreciate a little more help again! <G>

thanks,

Richard
Marshall Barton - 28 Oct 2004 01:07 GMT
>On my report, I have 4 unbound checkboxes. But I would like to have them
>either be checked (true) or unchecked (false) based on data entered in
[quoted text clipped - 21 lines]
>But all this did was make the checkbox checked, regardless if the field was
>set to "In" or "Out".

No code needed for this.  Set each of the check box's
ControlSource expression to this kind of thing:

    =Location = "OUT"
    =Not DATE_LOANED Is Null

Signature

Marsh
MVP [MS Access]

Richard - 29 Oct 2004 00:28 GMT
Marsh,

thanks again. I'm starting to get scared, because I think I am actually
catching on  lol

Richard

> >On my report, I have 4 unbound checkboxes. But I would like to have them
> >either be checked (true) or unchecked (false) based on data entered in
[quoted text clipped - 27 lines]
>     =Location = "OUT"
>     =Not DATE_LOANED Is Null
 
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.