G
Guest
New to Access Programming and would like to open (preview) a report from
clicking a form button. I would like the form to pass a value (its UID) to
the underlying report query (Stored Procedure) to narrow the results. Not
working, any help? Thanks
Button's Event Procedure:
Private Sub Print_Roster_Click()
On Error GoTo Err_Print_Roster_Click
Dim stDocName As String
stDocName = "CourseRoster"
stLinkCriteria = "[ScheduleDetailsID]=" & Me![ScheduleDetailsID]
DoCmd.OpenReport stDocName, acPreview, , , stLinkCriteria
Exit_Print_Roster_Click:
Exit Sub
Err_Print_Roster_Click:
MsgBox Err.Description
Resume Exit_Print_Roster_Click
End Sub
clicking a form button. I would like the form to pass a value (its UID) to
the underlying report query (Stored Procedure) to narrow the results. Not
working, any help? Thanks
Button's Event Procedure:
Private Sub Print_Roster_Click()
On Error GoTo Err_Print_Roster_Click
Dim stDocName As String
stDocName = "CourseRoster"
stLinkCriteria = "[ScheduleDetailsID]=" & Me![ScheduleDetailsID]
DoCmd.OpenReport stDocName, acPreview, , , stLinkCriteria
Exit_Print_Roster_Click:
Exit Sub
Err_Print_Roster_Click:
MsgBox Err.Description
Resume Exit_Print_Roster_Click
End Sub