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 / New Users / October 2007

Tip: Looking for answers? Try searching our database.

Conditional Formatting in reports-5 Conditions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tg7 - 02 Oct 2007 21:08 GMT
I need some help with formatting a field in a report based on a cross-tab
query.  I am not very good at code so bear with me.  I am currently using the
conditional formatting, but have one additional criteria.  The field I need
to format in the report shows audit results.  I need one color (default) for
blank/audit not due yet, then the conditional formatting changes to green if
the results are 95% or greater, yellow for 94%-90%, and red for below 90%.  I
need one more color to represent that the results are not required for the
particular facility.  I want to base this on another field being populated,
the audit received field.  If the audit received field has a date, but the
results field is blank, I want the report to show dark blue in the results
field.

Is this possible?
Dennis - 04 Oct 2007 03:44 GMT
In the DETAIL section of the VBA code for the report:

Select Case myIndicator
  Case 1 ' Not due yet
     me.displayFieldName.backcolor = someValueOfYourChoice
  Case 2 ' >= 95%
     me.displayFieldName.backcolor = someOTHERValueOfYourChoice
  Case 3 ' 90-94%
     me.displayFieldName.backcolor = someOTHERValueOfYourChoice
  Case 4 ' < 90%
     me.displayFieldName.backcolor = someOTHERValueOfYourChoice
End Select

Now I used simple single-numbers as an "indicator" for the requested values,
but you can replace those with the actual values and/or ranges that you want.
The important thing to note here is the actual syntax. for changing the
colors and determining which colors to choose. Armed with this information
and the Visual Basic Help facility, you should be able to resolve the issue.

> I need some help with formatting a field in a report based on a cross-tab
> query.  I am not very good at code so bear with me.  I am currently using the
[quoted text clipped - 9 lines]
>
> Is this possible?
 
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.