filter report with a listbox

L

Lost 1

I am trying to run a report - when the report is selected a form pops up
(JobSortList) with a listbox (JobList) showing values it pulled from a
query (qryJobABT). I need to be able to select one or multiple values
from a listbox then filter and display it on the report (rptJobABT).

Form Code (frmJobABT):
Private Sub Preview_Click()
DoCmd.OpenReport "rptJobABT",acViewPreview, ,
"((qryJobABT.JobID=1))"
End Sub

Report Code (rptJobABT):
Private Sub Report_NoData(Cancel As Integer)
MsgBox "There is no data for this report. Canceling report..."
Cancel = -1
End Sub

Private Sub Report_Close()
DoCmd.close acForm, "JobSortList"
End Sub

Private Sub Report_Open(Cancel As Integer)
DoCmd.OpenForm "JobSortList", , , , , acDialog, "Active & Being
Trained Volunteers"
If Not IsLoaded("JobSortList") Then
Cancel = True
End If
End Sub

Any help would be greatly appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top