I have a form, frmLog, that requires a date, start time, and end time for meetings. The record source for the form is tblLogHold. I am trying to prevent duplicates in tblLog. Here are the fields involved:
DateOfMeeting, StartTime, DupeDateOfMeeting
I want the DupeDateOfMeeting to equal the DateOfMeeting if there is already a record in tblLog with the same DateOfMeeting and the same StartTime.
Here is what I have in the control StartTime.AfterUpdate.
Start Of Code
DupeDateOfMeeting = DLookup("DateOfMeeting", "tblLog", "[DateOfMeeting] =" & frmLog.DateOfMeeting And "[StartTime] =" & frmLog.StartTime)
End Of Code
I am getting a Visual Basic error message:
Run-time error "424':
Object required
Any ideas to help?
Thank you.
DateOfMeeting, StartTime, DupeDateOfMeeting
I want the DupeDateOfMeeting to equal the DateOfMeeting if there is already a record in tblLog with the same DateOfMeeting and the same StartTime.
Here is what I have in the control StartTime.AfterUpdate.
Start Of Code
DupeDateOfMeeting = DLookup("DateOfMeeting", "tblLog", "[DateOfMeeting] =" & frmLog.DateOfMeeting And "[StartTime] =" & frmLog.StartTime)
End Of Code
I am getting a Visual Basic error message:
Run-time error "424':
Object required
Any ideas to help?
Thank you.