My Assistant
![]() ![]() |
|
|
Aug 9 2011, 10:33 AM
Post
#1
|
|
|
UtterAccess Veteran Posts: 318 From: London UK |
Hi guys
Can someone help me please. If I want to Change the Color format of a text field on a report I would do the following Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If Me.DriverName = "Tom Symonds" Then Me.DriverName.BackColor = QBColor(8) Else Me.DriverName.BackColor = QBColor(10) End If End Sub But if it is a date field Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If Me.Driver_End_Date = ???????? Then (Can someone please tell me what to put here if date field is null) Me.Driver_End_Date.BackColor = QBColor(8) Else Me.Driver_End_Date.BackColor = QBColor(10) End If End Sub Many Thanks Ian |
|
|
|
Aug 9 2011, 01:24 PM
Post
#2
|
|
|
UtterAccess VIP Posts: 8,170 From: Pacific NorthWet |
First, just as you used quotes (") as delimiters around your text value, you'll need to use the correct delimiters around your date/time value (use the pound sign - '#').
I'm not sure I understand what you want to have happen if there is no date (you mentioned a Null)... |
|
|
|
Aug 10 2011, 03:38 AM
Post
#3
|
|
|
UtterAccess Veteran Posts: 318 From: London UK |
My apologies for not explaining myself very well
I have a field on a report called Driver_End_Date (Date Format) which will either be empty or have a date in it If I want to test to see if its empty and then change the Backcolor of another field called DriverName can someone show me how to write the IF statement Also can you change Multiple fields ie DriverName , LicenseAuthority , DriverType etc Appreciated Ian |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 23rd May 2013 - 12:02 AM |