Rabu, 21 September 2011

[MS_AccessPros] report not reading filter

 

Great Day, I am attempting to open a report that has a filter in the click event of the button that opens it up> This is the code:

Private Sub btnOpen_Report_Click()

Dim stDocName As String
Dim stFilter As String
Dim stDateRange As String

'set conditions
stDocName = "rptInvoice2"
stLinkCriteria = "[JobID]=" & Me.txtJobID
'Open report
DoCmd.OpenReport stDocName, acViewPreview, stLinkCriteria

End Sub

However, the report previews without establishing the filter and it loads all of the records. I am only expecting one record to open with the report.

thanks in advance for your assistance.

r/David

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar