G
Guest
I have a report that I want to pass to parameters on.
SELECT Responses.[Name of Business], Responses.[Main Category], *
FROM Responses
WHERE (((Responses.[Name of Business])=[Forms]![Main Reports].[BN]) AND
((Responses.[Main Category]) Like [Forms]![Main Reports].[cat] & "*"))
WITH OWNERACCESS OPTION;
When I open the report from the database window it works (I have to put in
the info)
But when I try to open the report from the form Main Reports it is blank?
The button that I created to open is:
Private Sub Command16_Click()
On Error GoTo Err_Command16_Click
Dim stDocName As String
stDocName = "Responses1"
DoCmd.OpenReport stDocName, acPreview
Exit_Command16_Click:
Exit Sub
Err_Command16_Click:
MsgBox Err.Description
Resume Exit_Command16_Click
End Sub
What am I doing wrong?
I have a similiar report that works - the only diffrence is the report only
has one parameter.
SELECT Responses.[Name of Business], Responses.[Main Category], *
FROM Responses
WHERE (((Responses.[Name of Business])=[Forms]![Main Reports].[BN]) AND
((Responses.[Main Category]) Like [Forms]![Main Reports].[cat] & "*"))
WITH OWNERACCESS OPTION;
When I open the report from the database window it works (I have to put in
the info)
But when I try to open the report from the form Main Reports it is blank?
The button that I created to open is:
Private Sub Command16_Click()
On Error GoTo Err_Command16_Click
Dim stDocName As String
stDocName = "Responses1"
DoCmd.OpenReport stDocName, acPreview
Exit_Command16_Click:
Exit Sub
Err_Command16_Click:
MsgBox Err.Description
Resume Exit_Command16_Click
End Sub
What am I doing wrong?
I have a similiar report that works - the only diffrence is the report only
has one parameter.