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 2006

Tip: Looking for answers? Try searching our database.

How can I format color in my query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Themba - 13 Dec 2005 09:28 GMT
When i run my query i've realised i got negative numbers.So i'd would like to
change the color for the negative numbers numbers to red.And the positive
ones should remain black.how can I do this
Rick B - 13 Dec 2005 14:32 GMT
In the query or in the report?  You posted this to a report newsgroup.

Signature

Rick B

> When i run my query i've realised i got negative numbers.So i'd would like
> to
> change the color for the negative numbers numbers to red.And the positive
> ones should remain black.how can I do this
Duane Hookom - 13 Dec 2005 14:53 GMT
You should really use forms whenever possible. In any case you can set the
format property of the column/text box to something like:

#,##0.00[Black];(#,##0.00)[Red];0.00;"Null"

Signature

Duane Hookom
MS Access MVP
--

> When i run my query i've realised i got negative numbers.So i'd would like
> to
> change the color for the negative numbers numbers to red.And the positive
> ones should remain black.how can I do this
bernie - 17 Jan 2006 20:26 GMT
I understand, you want the negative numbers to show up coloured in a report.

Have the report in design view and call up the code window.
The following example shows different colours at given blood pressure levels:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

Select Case Me!Diastole
   Case Is = "N/A"
       With Me!Diastole
           .ForeColor = QBColor(0)
           .FontBold = False
       End With
       
   Case Is <= 90
       With Me!Diastole
           .ForeColor = QBColor(2)
           .FontBold = True
       End With
     
   Case Else
       With Me!Diastole
           .ForeColor = QBColor(12)
           .FontBold = True
       End With
       
End Select

End Sub

Configure the “Select Case” to your needs.
Hope this helps.

> When i run my query i've realised i got negative numbers.So i'd would like to
> change the color for the negative numbers numbers to red.And the positive
> ones should remain black.how can I do this
 
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.