I am trying to send the Form's Orderby and Filter Parameter to a report. I have got the Filter parameter to pass to the report, but I can't figure out how to pass the OrderBy parameter. Here's what I have so far:
Private Sub Command47_Click()
On Error GoTo Err_Command47_Click
Dim stDocName As String
stDocName = "Select, Patient Lookup"
If Me.FilterOn Then
DoCmd.OpenReport stDocName, acViewPreview, , Me.Filter
Me.OrderBy = Me.OrderBy
Me.OrderByOn = True
Else
DoCmd.OpenReport stDocName, acViewPreview
Me.OrderBy = Me.OrderBy
Me.OrderByOn = True
Anyone got a suggestion?
Private Sub Command47_Click()
On Error GoTo Err_Command47_Click
Dim stDocName As String
stDocName = "Select, Patient Lookup"
If Me.FilterOn Then
DoCmd.OpenReport stDocName, acViewPreview, , Me.Filter
Me.OrderBy = Me.OrderBy
Me.OrderByOn = True
Else
DoCmd.OpenReport stDocName, acViewPreview
Me.OrderBy = Me.OrderBy
Me.OrderByOn = True
Anyone got a suggestion?