{{ Split from: Using DLookUp to prevent duplicates in Form }}
Hi all,
I was just tasked at tweaking the above macro and again I cannot find the right combination... I need to put an exception to a particular location. In other words the macro should alert to duplicate locations unless the location is equal to "17LR". The above works perfectly in another part of the database, here is what I tried:
And it just does not prompt for ANY duplicates anymore, I thought maybe it was because of the "LR" in the location, so I tested with "1752" and the same results, I also tried "Or" instead of "And", that will prompt for the dupes, but when I select "1752" it does not allow me to save the record and/or move to next record, I have to cancel the changes...
Thanks again for your help!!!
Hi all,
I was just tasked at tweaking the above macro and again I cannot find the right combination... I need to put an exception to a particular location. In other words the macro should alert to duplicate locations unless the location is equal to "17LR". The above works perfectly in another part of the database, here is what I tried:
Code:
DLookUp("[OfficeLocation]","[tblEmployeeInfo]","[OfficeLocation] = Form.[OfficeLocation] And [OfficeLocation]<>17LR") Is Not Null
Thanks again for your help!!!
Comment