Hi
I'm trying to check if a timesheet for a certain employee on a certain date has been entered already and if so display a message. I'm using the Dcount function on the after update event on a combo box but keep getting o records. My code is
Dim IntCount As Long
IntCount = DCount("TimesheetID", "tbltimesheet", "[DriverID]=" & Me.DriverID.Value & " AND [Date]=" & Me.Date.Value)
I can get it to work on the first criteria only but when I add in the Date part it doesn't. I'm sure it's just my syntax but I've tried various options and can't seem to find a solution.
Would really appreciate any help.
Thanks
I'm trying to check if a timesheet for a certain employee on a certain date has been entered already and if so display a message. I'm using the Dcount function on the after update event on a combo box but keep getting o records. My code is
Dim IntCount As Long
IntCount = DCount("TimesheetID", "tbltimesheet", "[DriverID]=" & Me.DriverID.Value & " AND [Date]=" & Me.Date.Value)
I can get it to work on the first criteria only but when I add in the Date part it doesn't. I'm sure it's just my syntax but I've tried various options and can't seem to find a solution.
Would really appreciate any help.
Thanks