I have 2 list box's on a form
lstPaymentDate = SELECT DISTINCT PaymentDate FROM tblPayment ORDER BY PaymentDate DESC;
lstSelectEmployee = SELECT tblPayment.EmployeeWageId FROM tblPayment WHERE (((PaymentDate) Like [Forms]![frmPrintPayment]![lstPaymentDate]));
This works perfectly
I have now added a command button
When I click on the button, the 1st record in lstPaymentDate is selected, but no records appear in lstSelectEmployee (There are records!!!)
How do I get the records to display in lstSelectEmployee ?
Thanks in advance
lstPaymentDate = SELECT DISTINCT PaymentDate FROM tblPayment ORDER BY PaymentDate DESC;
lstSelectEmployee = SELECT tblPayment.EmployeeWageId FROM tblPayment WHERE (((PaymentDate) Like [Forms]![frmPrintPayment]![lstPaymentDate]));
Code:
Private Sub lstPaymentDate_AfterUpdate()
Me.lstSelectEmployee.Requery
end sub
This works perfectly
I have now added a command button
Code:
Private Sub cmdOneClickAll_Click()
Me.lstPaymentDate.Selected(0) = True
Me.lstSelectEmployee.Requery
end sub
When I click on the button, the 1st record in lstPaymentDate is selected, but no records appear in lstSelectEmployee (There are records!!!)
How do I get the records to display in lstSelectEmployee ?
Thanks in advance