Conditional Formatting

G

Guest

I am getting data from an ODBC database and one of the fields is a date. When
I link the table into an Access database the date comes thru as a text field.
I'm trying to use expressions to do a conditional format in a report based on
the date, but it's not working. I have a report where the date field is
recognized as a "Date/Time" field, and these expressions work, e.g.: field
value is between [last sale] > Date Add("m",-1,Date()) and [last sale] <
Date()-6 = YELLOW. I try this in my new report and it won't work. Since it's
a linked table I can't chage the format on the date field. Any ideas?
 
M

Marshall Barton

Gimpy815 said:
I am getting data from an ODBC database and one of the fields is a date. When
I link the table into an Access database the date comes thru as a text field.
I'm trying to use expressions to do a conditional format in a report based on
the date, but it's not working. I have a report where the date field is
recognized as a "Date/Time" field, and these expressions work, e.g.: field
value is between [last sale] > Date Add("m",-1,Date()) and [last sale] <
Date()-6 = YELLOW. I try this in my new report and it won't work. Since it's
a linked table I can't chage the format on the date field.

It depends on the format of the date in the text field. Try
using the CDate function on the text date field.

CDate([last sale]) > Date Add("m",-1,Date())
And CDate([last sale]) < Date()-6
 

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