make sure a record is not entered twice

The Chamber value is text, thus must be surrounded by single quotes, just like part number. When I make that change, it works.
 
ok this is what I have so far

If DCount("[Part Number]", "[tble-Parts History]", "[Part Number] = '" & Me.[Part Number] & "' AND [system] = " & Me.[system] & " AND [Chamber] = '" & Me.[Chamber] & "' AND [Currently in use] = True") > 0 Then

so now if the part number is new it works but if the part number and system, chamber are there and the Currently in use is false it should also pass and be ok but it does not. It looks like it does not care True or false ?

jon
 
I believe you're running into the record you're currently adding, which has already been inserted at that point. The record actually saves as soon as you select something in the combo.
 

Users who are viewing this thread

Back
Top Bottom