robcrussiii
Registered User.
- Local time
- Today, 00:55
- Joined
- Mar 1, 2005
- Messages
- 12
I have a form that my users sign out on with thier name, dateout, timeout, datein, timein, reason... Also on this form I have a list box that runs a query to show people currently out of the office. I am trying to make the form populate the sign out information of a person when you double click thier name from the 'currently out' list. Im not having alot of luck. I cant seem to get it to pull in the correct/any recordset. Below is the code I am trying to use to perform this action. Anyone give me some advice on where I am going wrong?
Private Sub Outlist_DoubleClick(Cancel As Integer)
Dim ctlEmpName As Control
Dim ctlOutList As Control
Set ctlEmpName = Me!EmpName
Set ctlOutList = Me!OutList
Me!EmpName.RowSource = "SELECT EmpID, EmpName FROM tblEmployees WHERE EmpID = forms!frmSignOut.OutList ORDER BY EmpName;"
ctlEmpName.Requery
Me.Refresh
End Sub
Private Sub Outlist_DoubleClick(Cancel As Integer)
Dim ctlEmpName As Control
Dim ctlOutList As Control
Set ctlEmpName = Me!EmpName
Set ctlOutList = Me!OutList
Me!EmpName.RowSource = "SELECT EmpID, EmpName FROM tblEmployees WHERE EmpID = forms!frmSignOut.OutList ORDER BY EmpName;"
ctlEmpName.Requery
Me.Refresh
End Sub
Last edited: