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 / Forms / November 2007

Tip: Looking for answers? Try searching our database.

Form's Formatting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bill - 16 Nov 2007 02:44 GMT
Shouldn't this conditional formatting work? (CF
applied to a text box on a form.)

1st cond:    Expression is --- [Missing]=True     Red
2nd cond:  Expression is --- [Deceased]=True  Blue

Only the second of the two specifications takes effect.
If I reverse them, once again it's only the 2nd spec that
effects display.

The conditional formatting is specified on two text box
controls on a continuous form, where "missing" and
"deceased" are in the fields collection of the
RecordSource query.

This exact conditional formatting specification works
perfectly on a Report that uses the same un-filtered
query and similar text boxes.
Al Campagna - 16 Nov 2007 04:14 GMT
Bill,
>  controls on a continuous form, where "missing" and
>  "deceased" are in the fields collection of the RecordSource query.

   Are you saying that the 2 text controls contain "Missing" in one, and
"Deceased" in the other?
   Are they bound fields, and what are the names of those text controls?
   Why are you using text controls for a boolean value?  I would think
Missing & Deceased would be True/False fields, each using a checkbox to set
it's value.

   Sounds like your expressions both always equate to True.  So whatever
the last statement is... it gets that color.
   I'm probably misunderstanding.  From what I gather from your post...
> 1st cond:    Expression is --- [Field1] = "Missing"     Red
> 2nd cond:  Expression is --- [Field2] = "Deceased"  Blue
should do it.
Signature

   hth
   Al Campagna
   Microsoft Access MVP
   http://home.comcast.net/~cccsolutions/index.html

   "Find a job that you love... and you'll never work a day in your life."

> Shouldn't this conditional formatting work? (CF
> applied to a text box on a form.)
[quoted text clipped - 14 lines]
> perfectly on a Report that uses the same un-filtered
> query and similar text boxes.
Bill - 16 Nov 2007 04:38 GMT
Al,

The controls, tblastname and tbfirstname are the controls
bound to an individual's name and it is to those fields that
the conditional formatting is applied. "Deceased" and
"Missing" are two True/False fields in the RecordSource
that indicate whether the name in the current record are
either missing or deceased. I simply want the name fields
to display in different colors when those conditions apply.

Bill

> Bill,
>>  controls on a continuous form, where "missing" and
[quoted text clipped - 31 lines]
>> perfectly on a Report that uses the same un-filtered
>> query and similar text boxes.
Al Campagna - 16 Nov 2007 17:43 GMT
Bill,
  Well, I don't see why your conditioning isn't applying properly.  Your
expressions appear to be correct.
   I just whipped up a little form to test your expression, and it worked
just fine.
   (always Refresh on the AfterUpdate event of Missing and Deceased)

  Would you send me the file?
       Zip and send to my Contact on my website below.
       In that email, please use "AccessNG" in the subject.
       Indicate what version of Access, and exactly what form the problem
relates to.
       No charge-confidentiality ensured...
Signature

   hth
   Al Campagna
   Microsoft Access MVP
   http://home.comcast.net/~cccsolutions/index.html

   "Find a job that you love... and you'll never work a day in your life."

> Al,
>
[quoted text clipped - 43 lines]
>>> perfectly on a Report that uses the same un-filtered
>>> query and similar text boxes.
Bill - 16 Nov 2007 15:50 GMT
I think that what's happening is that the first condition
in fact works correctly, but the second condition would
essentially negate whatever the 1st condition's settings
might have been. I.e., if the 1st condition is true then
certainly the 2nd condition would be false.

I tried creating another unbound text box and invoking
a public function from its conditional formatting to set
the forecolor properties of the tbfirstname and tblastname
controls in code, but the default colors continue to prevail.

I do not see a way to do this, unless there's some way to
code a single IIF statement with some sort of compound
expression that sets forecolor to blue, red or black.

Bill

> Shouldn't this conditional formatting work? (CF
> applied to a text box on a form.)
[quoted text clipped - 14 lines]
> perfectly on a Report that uses the same un-filtered
> query and similar text boxes.
Bill - 16 Nov 2007 23:37 GMT
This problem went away as mysteriously as it
appeared. The conditional formatting was
deleted and re-added exactly as was done
originally. The ONLY difference was that
I just happened to add the CF while in form
view rather than Design View, something I'd
never done in the past.

Go figure.

Bill

> Shouldn't this conditional formatting work? (CF
> applied to a text box on a form.)
[quoted text clipped - 14 lines]
> perfectly on a Report that uses the same un-filtered
> query and similar text boxes.
 
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.