setting from to date (1 Viewer)

Jediphase

Registered User.
Local time
Today, 13:28
Joined
Apr 18, 2002
Messages
38
Hey people,

I want to create a report that shows records using a from to date.

the dates im pulling off a form using the date time picker control

so far within the report open event i have used this line

me.recordsource = "SELECT transaction.* FROM [transaction] WHERE (((transaction.Invoice_date) Between #" & form_rep.from & "# And #" & form_rep.to & "#));

For some reason it will not set the record source properly.

The error is missing operator / syntax.

What am I missing or is there a better way of producing a report between two user specified dates??

thank you
 

charityg

Registered User.
Local time
Today, 13:28
Joined
Apr 17, 2001
Messages
634
try

"SELECT transaction.* FROM [transaction] WHERE (((transaction.Invoice_date) Between #" & forms![form_rep]![from] & "# And #" & forms![form_rep]![to] & "#));"
 

Jediphase

Registered User.
Local time
Today, 13:28
Joined
Apr 18, 2002
Messages
38
Lurvely juberly

Thankyou for the help there. I changed the method for setting the reports instead of changing the recordsource within the open event of the report i set the onclick of a button to open the report

report.(reportname),,,Where condition

That set the correct parameters for the report using the dates from the form that the user sets up.

Thank you
 

Users who are viewing this thread

Top Bottom