Listbox search

J

JOM

I have a form with unbound combo box and unbound listbox, What am trying to
do is select an employee name from the combo box, then the listbox show which
months he has stuff worked on, double click a month and then preview a report
for that specific employee for that specific month.

What is currently happening now is that I able to select an employee from
the combo box, an able to see the months that the employee has worked on but
when I double click it, it brings all the employees that worked stuff in that
month, how will I take care of this...

Here is the sample code when I double Click

Private Sub List4_DblClick(Cancel As Integer)

Dim DocName As String

DocName = "Monthly Employee Tracking"

DoCmd.OpenReport DocName, acViewPreview, , "[Month]='" & Forms![Search
Monthly Employee]![List4] & "'"


Exit_List0_DblClick:
Exit Sub

Err_List0_DblClick:
MsgBox Err.Description
Resume Exit_List0_DblClick


End Sub


The month and year are derived from the [TrackDate]
 

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