G
Guest
I have a unbound form that has undound combo box and unbound listbox.... What
am doing is selecting an employees name from the combo box and the listbox is
populated with which months ( ie I formated the months as follows
=Format$([TrackDate],"mmmm yyyy",0,0))they worked stuff on.
When I click on an item from the listbox, it opens everyone elses stuff for
that month and not that just specific employee... this is the code I have for
opening the report
Private Sub List4_DblClick(Cancel As Integer)
Dim DocName As String
DocName = "Monthly Employee Tracking"
DoCmd.OpenReport DocName, acViewPreview, , "[Months]='" & Forms![Search
Monthly Employee]![List4] & "'"
End sub
The following is the sql statement that I have that the list box infor
contains!
SELECT DISTINCT Format$([TrackDate],"mmmm yyyy",0,0) AS Months,
Tracking.EmplID
FROM Tracking
GROUP BY Format$([TrackDate],"mmmm yyyy",0,0), Tracking.EmplID
HAVING (((Tracking.EmplID)=[Forms]![Search Monthly Employee]![cmbsrchEmpl]))
ORDER BY Tracking.EmplID;
Please help
am doing is selecting an employees name from the combo box and the listbox is
populated with which months ( ie I formated the months as follows
=Format$([TrackDate],"mmmm yyyy",0,0))they worked stuff on.
When I click on an item from the listbox, it opens everyone elses stuff for
that month and not that just specific employee... this is the code I have for
opening the report
Private Sub List4_DblClick(Cancel As Integer)
Dim DocName As String
DocName = "Monthly Employee Tracking"
DoCmd.OpenReport DocName, acViewPreview, , "[Months]='" & Forms![Search
Monthly Employee]![List4] & "'"
End sub
The following is the sql statement that I have that the list box infor
contains!
SELECT DISTINCT Format$([TrackDate],"mmmm yyyy",0,0) AS Months,
Tracking.EmplID
FROM Tracking
GROUP BY Format$([TrackDate],"mmmm yyyy",0,0), Tracking.EmplID
HAVING (((Tracking.EmplID)=[Forms]![Search Monthly Employee]![cmbsrchEmpl]))
ORDER BY Tracking.EmplID;
Please help