set conditional formatting in a calculated text box on a form?

D

Dorim

I have a form where I have fields from my database [Picked Time] and [Shipped
Time] and then I have a calculated text box which uses this formula:
=HoursAndMinutes[Shipped Time]-[Picked Time] to calculate the elapsed time
from the time the order was picked to when it was shipped. It is not really
a field in the database and it only shows up on the form but I want it to
turn the font red and bold if the elapsed time is equal to or greater than 2
hours. A sample value for this field is 2:15. As you can see it results in
a time format. This field calculates on it's own so I never click on to it
or enter any data in it.

I've tried using the conditional formating by right clicking on the field
and typing the criteria - that didn't work. Then I tried using an expression
- that didn't work either as it didn't like the time format. I just couldn't
get anything to work. Any suggestions are welcome.
 
K

Klatuu

You could put a line in the HoursAndMinutes function to format the text box.
You would also have to put the same code in the form Current event to handle
existing records.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top