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