Rabu, 29 Mei 2013

[MS_AccessPros] How am I to tell the report to use the form’s record source?

 

My form has a combo box for filtering records, and a Cmdbutton to open a report.

I have been trying to pass the form's OpenArgs to the Report_Open procedue, so the report's Recordsource can base on the criteria that the user selected from the form. How am I to tell the report to use the form's record source?

Below's what I have been trying to do.

Private Sub cmdOpenRpt_Click()

Dim strCntryName As String

strCntryName = Me.cboCountry

DoCmd.OpenReport "RptCustomers", acViewPreview, , , acWindowNormal, strCntryName

End Sub

Private Sub Report_Open(Cancel As Integer)
Me.OpenArgs
End Sub

Thanks
Phucon

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)
.

__,_._,___

Tidak ada komentar:

Posting Komentar