invalid syntax

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?
 
T

Tom

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?


.
 

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

Similar Threads


Top