format font based on form date entries

ppoindexter

Registered User.
Local time
Today, 15:15
Joined
Dec 28, 2000
Messages
134
I need to format the font in a text box on a report based on dates entered in text boxes on a form:

frmA

txtStartDate
txtEnd Date


rpt1
(in details section)

txtReportDate

on format event (something like this)

If [txtReportDate] => [txtStart] AND =<[txtEnd] THEN
Me![ReportDate].ForeColor = 16764057
Else
Me![ReportDate].ForeColor = 13434828
End if

I placed two text boxes on the report and placed the following in the control source:

=Forms!frmA!txtStartDate (txtStart)

=Forms!frmA!txtEndDate (txtEnd)


thanks in advance
 
Is there a question there somewhere?

Looks OK to me, except you will want to change your condition to:

If [txtReportDate] >= [txtStart] AND [txtReportDate] <= [txtEnd] THEN
 
I guess I didnt state the question very clearly but the code I was using wasnt working, I will try your suggestion.

thanks for your help!
 

Users who are viewing this thread

Back
Top Bottom