kengooch
Member
- Local time
- Today, 03:22
- Joined
- Feb 29, 2012
- Messages
- 137
I am trying to pass the filter from my from that I selected from an unbound Combo Box to a Report.
The Unbound Combo Box obtains it's data from the tDept Table which
Sample Data:
The code to select the Department is below:
I have a button on the Form to Print the Report and I have the following Code in it.
The Unbound Combo Box obtains it's data from the tDept Table which
Sample Data:
The code to select the Department is below:
Code:
'------------------------------------------------------------
'Show Records by Department
'------------------------------------------------------------
Private Sub luDept_AfterUpdate()
On Error GoTo luDept_AfterUpdate_Err
DoCmd.SearchForRecord , "", acFirst, "[tDeptAbbrv] = " & "'" & Screen.ActiveControl & "'"
luDept = Null
DoCmd.GoToControl "luPlcyNm"
luDept_AfterUpdate_Exit:
Exit Sub
luDept_AfterUpdate_Err:
MsgBox Error$
Resume luDept_AfterUpdate_Exit
End Sub
Code:
Private Sub bPlcyCmplt_Click()
'This Code Handles the Report based upon the Filter selections
MsgBox "pause"
DoCmd.OpenReport "rPolicyComplete", acViewReport, , "tPlcydpt = " & [tPlcydpt]
With Reports("rPolicyComplete")
.OrderBy = "tplcyspID"
.OrderByOn = True
End With
End Sub
I have a button on the Form to Print the Report and I have the following Code in it.
Last edited by a moderator: