invalid syntax

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

I have five columns in a query that display dates only
(data type is date). I need to create a report of the
query that shows in 'BOLD' dates no later than the past 30
days. I used the following code in the criteria field of
the date columns, but got an invalid syntax error (it
says 'you may have entered an operand without an
operator'):

if DateDiff("d",[DateField],date) <=30 then
[DateField].FontBold = true
else
[DateField].FontBold = false

What could be wrong?
 
I did but it still gives me the same error
note: 'then' was highlighted
-----Original Message-----
You will need an 'End If' statement at the end of the code.

<M>ike

Tom said:
I have five columns in a query that display dates only
(data type is date). I need to create a report of the
query that shows in 'BOLD' dates no later than the past 30
days. I used the following code in the criteria field of
the date columns, but got an invalid syntax error (it
says 'you may have entered an operand without an
operator'):

if DateDiff("d",[DateField],date) <=30 then
[DateField].FontBold = true
else
[DateField].FontBold = false

What could be wrong?


.
 
Back
Top