I've got a condition where, when the user has made a duplicate entry in the primary key field of a record entry, i don't want to junk the whole record as being invalid, but flag it as a duplicate field, preserving the remainder of the record entry, and allow the user an opportunity to review the original and then decide how to handle the duplicate value....
so i wrote this snippet... but i am not able to (and it may be an obvious problem to an experienced programmer -which i am not) re-assign a value to that field (me.type)
If DCount("[type]", "tbeFixtureTypeDetails", "[type]= '" & Me.Type & "'") > 0 Then
vmsgtxt = "This fixture type is already being used; please try again"
vmsgtitle = "DUPLICATE FIXTURE TYPE"
Response = MsgBox(vmsgtxt, vbCritical + vbRetryCancel, vmsgtitle)
vType = Me.txtType & "-DUP!"
Cancel = True
' --- this next line in the problem
Me.txtType = vType
' ---
End If
any thoughts would be greatly appreciated in advance
mark