Button to Generate Report not Filtering

tjones

Registered User.
Local time
Today, 00:39
Joined
Jan 17, 2012
Messages
199
I have a button on a form that opens and generates an attendance sheet report. That is working fine but I also need it to filter the list of names on the report to just the form for a specific activity (ActivityID) that is displaying when you click the button instead of all names for all activities.

Private Sub cmdAttendSht_Click()
On Error GoTo Err_Enrollment_Form_Click
Dim stDocName As String
stDocName = "Activity Enrollment"
DoCmd.OpenReport stDocName, acPreview (i have tried adding a where clause here but could not get it to work - "Where Screen.ActiveReport "
 

Users who are viewing this thread

Back
Top Bottom