Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter /Open Report Command Button

Status
Not open for further replies.

mdavis1

Programmer
Aug 14, 2000
30
US
**
Code:
Private Sub cmdOpenReport_Click()
    If Me.Filter = "" Then
        MsgBox "Apply A Filter to the Form First!!"
    Else
        DoCmd.OpenReport "Report1", acViewPreview, , Me.Filter
End If
End Sub
**
i have a form &quot;frmCustomerSurveySheet&quot; that has a command button &quot;open report&quot;code above. This button opens my report (Report1) with the selected record. works fine...BUT...i have another form (thanks to jimmythegeek)<qryCustName> ,on this form i have 4 combo boxes that are used to search/select customer info. I have a button on this form that, once you have selected your customer info, opens the &quot;frmCustomerSurveySheet&quot;. Here's the problem...when the form opens<frmCustomerSurveySheet> with the selected record <from qryCustName>i can't use the &quot;open report button&quot;...it gives me, the &quot;apply a filter first&quot; msg box....so......how do i make that button open the report with the record i selected from my customer info search form <qryCustName>??? [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top