Format text boxes on continuous form based on system date (1 Viewer)

jpkeller55

New member
Local time
Today, 08:44
Joined
May 10, 2012
Messages
9
Hi, I am having trouble finding the right VBA to do this, but I have a continuous form (2003) with 6 text boxes (StartTime, StopTime, Comments etc...). I would like all the text boxes to have a gray background if the StartTime for that row is less than Today(). Any help is appreciated.
 

vbaInet

AWF VIP
Local time
Today, 14:44
Joined
Jan 22, 2010
Messages
26,374
You can look into using Conditional Formatting.
 

jpkeller55

New member
Local time
Today, 08:44
Joined
May 10, 2012
Messages
9
So I have to use conditional formatting for each text box? That is, I need to set each text box based on an expression related to the system time? I have been successful updating the background color of the one control using the conditional formatting function but not sure how to get the other controls to change background based on the StartTime value.
 
Last edited:

vbaInet

AWF VIP
Local time
Today, 14:44
Joined
Jan 22, 2010
Messages
26,374
That's right. If it wasn't a Continuous Form you could have used VBA.

You select Expression Is instead of Field Value and write an expression that will equate to True based on Start Time's value.
 

jpkeller55

New member
Local time
Today, 08:44
Joined
May 10, 2012
Messages
9
OK, I figured it out. Basically, I have to put this expression on each control for conditional format: [StartTime]<Date()

This works...thanks for your help!
 

Users who are viewing this thread

Top Bottom