Problems launching report - WHERE clause parameters

P

Pat Dools

Hello,

I am trying to launch a report from a command button on a switchboard. My
report is based on a query that has two pieces in the WHERE clause. I am
using this code, but I continue to get prompted for 'Session_ID' and
'Visit_Date' after I enter in the [Being Date] and [End Date] parameters I do
want visible for the user. And I did remove what I had in the WHERE clause
in the base query for both 'Session_ID' and 'Visit_Date'.

What is wrong with this code?

Private Sub CommandOpenVisitPerSession_Click()
DoCmd.OpenReport "rVisit_Per_Session", acViewPreview, "q_Visit_Per_Session",
"Visit_Date between [Begin Date] and [End Date] and Session_ID =1"
End Sub
 

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