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 / March 2008

Tip: Looking for answers? Try searching our database.

Formatting a column

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Love Buzz - 13 Mar 2008 18:33 GMT
Hey all.

I am creating a report from a queury I built and for some reason it won't
let me format one of the columns.  There is nothing in the drop down box
under Format.  Here is the expression:

Expr3: IIf([Expr2]/[SLA]=0," ",[Expr2]/[SLA])

It reflects the correct number, but I want to reflect it as a percent.  For
some reason the 'IIf' statement is not formatable?  Is that correct?

Any ideas?
Marshall Barton - 13 Mar 2008 20:32 GMT
>Hey all.
>
[quoted text clipped - 6 lines]
>It reflects the correct number, but I want to reflect it as a percent.  For
>some reason the 'IIf' statement is not formatable?  Is that correct?

Your use of " " is telling Access that the result of the IIf
is a text field.  Change that to either Null and it should
work.

OTOH, you don't need to use the IIf at all because the
report text box can use a custom format that won't display 0
values.  Maybe something like:
    0.00;-0.00;"";""
See Format Property in VBA Help for details.

Signature

Marsh
MVP [MS Access]

 
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.