Criteria in report header

L

Loi

Hi,
I have a parameter report and use it's criteria inserted
in CONTROL SOURCE of text box (on the report header)to
hope that it will show two days before entered day and 4
days after that. I always recieve the message like "Syntax
error in query expression 'First([Between DateAdd ("d", -2,
[Type in the date]) And DateAdd ("d", 4, [type in the
date])])."


Below is report criteria.

Between DateAdd("d",-2,[Type in the date]) And DateAdd
("d",4,[Type in the date])

It works fine in query.(It shows 7 days in row)

Please show me how to fix it so that in my report's header
will shows row of days.
Thanks
Loi
 
A

AlCamp

Loi,
If I understand your question properly...
Is this your query criteria?
Between DateAdd("d",-2,[Type in the date]) And DateAdd
("d",4,[Type in the date])
Then on the Report, a text control with
= [Type in the Date]
would show the date you entered as a parameter when the query ran.

With concatenation...
= "Between " & DateAdd("d",-2,[Type in the date]) & " and " &
DateAdd("d",4,[Type in the date])

Check my syntax... didn't have time to test, but that should do it
hth
Al Camp

Loi said:
Hi,
I have a parameter report and use it's criteria inserted
in CONTROL SOURCE of text box (on the report header)to
hope that it will show two days before entered day and 4
days after that. I always recieve the message like "Syntax
error in query expression 'First([Between DateAdd ("d", -2,
[Type in the date]) And DateAdd ("d", 4, [type in the
date])])."


Below is report criteria.

Between DateAdd("d",-2,[Type in the date]) And DateAdd
("d",4,[Type in the date])

It works fine in query.(It shows 7 days in row)

Please show me how to fix it so that in my report's header
will shows row of days.
Thanks
Loi
 

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