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 / January 2007

Tip: Looking for answers? Try searching our database.

Conditional formatting affects the display

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Scott - 28 Jan 2007 12:22 GMT
I have one field as below to show the contents of the fields; Model and
SupModel, depending on the availability of these fields and works correctly.

=IIf(IsNull([Model]),"(" & [SupModel] &
")",IIf(IsNull([SupModel]),[Model],[Model] & " (" & [SupModel] & ")"))

Once I add the following in conditional formatting of the field.  When both
fields are available, the SupModel was not displayed at all but the field
glows to the second row.  Can someone advise the possible causes and fixes
to it.

Expression Is    [Field5] Is Not Null

Thanks,

Scott
Allen Browne - 28 Jan 2007 13:13 GMT
I don't see what's wrong with the expression, Scott, but try this:
   =[Model] & "(" + [SupModel] + ")"

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

>I have one field as below to show the contents of the fields; Model and
>SupModel, depending on the availability of these fields and works
[quoted text clipped - 13 lines]
>
> Scott
Scott - 28 Jan 2007 17:35 GMT
Allen,

Your expression is simpler and working as well.  Thanks!

However, it still has my problem once the field is used the conditional
formatting.  Obviously, the conditional formatting has bug to affect the
result.  It cannot display the last row of the field (If the field of the
record has three rows, only the first two rows display.  If the field of the
record has two rows, only the first row displays.)  Is there any way to get
rid of it?

Thanks,

Scott

>I don't see what's wrong with the expression, Scott, but try this:
>    =[Model] & "(" + [SupModel] + ")"
[quoted text clipped - 16 lines]
>>
>> Scott
Allen Browne - 29 Jan 2007 00:04 GMT
Okay the issue might be one of timing, i.e. when Access calcualtes the
expression verses when it calcualtes the conditional formatting.

Could use use the whole expression in the CF intead of the name of the
calculated control? The CF expression could be:
   IsNull([Model]) And IsNull([SupModel])

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Allen,
>
[quoted text clipped - 31 lines]
>>>
>>> Scott
Scott - 29 Jan 2007 14:58 GMT
Allen,

I have located the source of error.  My original format must be in bold (was
normal) if the CF is red background and bold white font on condition.  Very
strange!

Regarding concatenation using + and &, I tried the following and it works.

=([FieldA]+"  ") & ([FieldB]+"  ")

But not working with three fields.

=(([FieldA]+"  ") & ([FieldB]+"  ") & [FieldC])

Do you have any idea where is wrong?

Thanks,

Scott

> Okay the issue might be one of timing, i.e. when Access calcualtes the
> expression verses when it calcualtes the conditional formatting.
[quoted text clipped - 38 lines]
>>>>
>>>> Scott
Allen Browne - 29 Jan 2007 15:10 GMT
Could be several things, such as the presence of zero-length strings or
spaces instead of Nulls.

Testing with IsNull() might help to pin it down.

The basic difference is that:
   "A" & Null        produces        "A"
   "A" + Null        produces        Null

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Allen,
>
[quoted text clipped - 54 lines]
>>>>>
>>>>> Expression Is    [Field5] Is Not Null
Scott - 29 Jan 2007 16:52 GMT
Allen,

Thanks for your advice.  Is it possible to concatenate a text field and a
memo field?

Scott

> Could be several things, such as the presence of zero-length strings or
> spaces instead of Nulls.
[quoted text clipped - 65 lines]
>>>>>>
>>>>>> Expression Is    [Field5] Is Not Null
Allen Browne - 30 Jan 2007 00:49 GMT
Sure. Give it a try.

Most scenarios are fine. There are some cautions when doing this in a UNION
query. Or in a recordset:
   http://allenbrowne.com/bug-16.html

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Allen,
>
[quoted text clipped - 72 lines]
>>>>>>>
>>>>>>> Expression Is    [Field5] Is Not 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.