Hello, I am running into a problem where I need to update an employee's record with a date based on two matches from a list box (EID & TERM DATE).
The first part of my code works fine if I just have one criteria to match where the [EID] equals my first column in the list box but when I add [Term Date] from the list box to match the Term Date from the list box, it fails. Maybe I have my syntax incorrect?
Any help is greatly appreciated!
'Mark date for sent employees
For Each varItem In Me.EEList.ItemsSelected
MyDB.Execute ("UPDATE tblEmployeeData SET [Date Sent Payout]=Date() WHERE [EID]='" & Me.EEList.Column(0, varItem) & "'" And [Term Date] = Me!EEList.Column(9, oItem))
Next
The first part of my code works fine if I just have one criteria to match where the [EID] equals my first column in the list box but when I add [Term Date] from the list box to match the Term Date from the list box, it fails. Maybe I have my syntax incorrect?
Any help is greatly appreciated!
'Mark date for sent employees
For Each varItem In Me.EEList.ItemsSelected
MyDB.Execute ("UPDATE tblEmployeeData SET [Date Sent Payout]=Date() WHERE [EID]='" & Me.EEList.Column(0, varItem) & "'" And [Term Date] = Me!EEList.Column(9, oItem))
Next