Access 2007 VBA Dcount problem 3
Posted on 2010-11-08
I'm embarrassed but still cannot figure out this final piece.
If DCount("[Part_Number]", "Etching_Schedule", _
"[Part_Number] = '" & Me.txtPart_Number & "' And [Run_Date] = #" & Me.dteRun_Date & "# And [Shift] = '" & Me.optShift & "'") > 0 Then
MsgBox "That part number already exists for that date and/or shift."
The Part_Number and Run_Date sections work propberly. I added the Shift part and it does not generate any errors, but does not find record with the duplicate Part Number, Date, and Shift.
the Shift field data type is TEXT.