Using Access 2007
I have 4 fields. Autonumber, Room, Task, Status. Using a button to enter the new record from a form created from a table how do i check for duplicate records with all 3 fields (not including Autonumber) before access enters the new record? I would like to have a message box open to warn of duplicates and then return to form at the same place, not removing the options from the fields (using combobox's) so the client can see the error and fix it. Is this possible using a macro or dlookup? I tried a macro with a Query, IF statement like this- (on button click)
(IF [Room]=Forms![Room Tasks Query]![Room] And [Task]=Forms![Room Tasks Query]![Task] And [Status]=Forms![Room Tasks Query]![Status]
but it errored for every record duplicated or not.
Names of Forms
Table-Room Tasks
Form-Room Tasks
Query-Room Tasks Query
I would snapshot the macro but haven't figured out how to do that yet.
Any help would be appreciated.
Blackkimba