C
cms
I have a table that lists shifts(shiftdetails) including their date/time. I
have a listbox that is a query of those and shows the last 10 shifts.
I would like the user to select one shift from the listbox, and hit a button
to generate a report using shiftid as a variable.
I currently have the report working, along with the where condition. I just
can not figure out how to pass the selected records shiftid value to it.
Private Sub previewrep_Click()
On Error GoTo Err_previewrep_Click
Dim stDocName As String
stDocName = "logs"
DoCmd.OpenReport stDocName, acPreview, , "shiftid = 48"
Exit_previewrep_Click:
Exit Sub
Err_previewrep_Click:
MsgBox Err.Description
Resume Exit_previewrep_Click
End Sub
have a listbox that is a query of those and shows the last 10 shifts.
I would like the user to select one shift from the listbox, and hit a button
to generate a report using shiftid as a variable.
I currently have the report working, along with the where condition. I just
can not figure out how to pass the selected records shiftid value to it.
Private Sub previewrep_Click()
On Error GoTo Err_previewrep_Click
Dim stDocName As String
stDocName = "logs"
DoCmd.OpenReport stDocName, acPreview, , "shiftid = 48"
Exit_previewrep_Click:
Exit Sub
Err_previewrep_Click:
MsgBox Err.Description
Resume Exit_previewrep_Click
End Sub