i have a form with many fields
when i type a duplicate value for primary key and save record duplicate error(attach it) is shown.
i want after update primary key check for duplicate, if is not duplicate other field allowed fill
how can do this?
i have a form with many fields
when i type a duplicate value for primary key and save record duplicate error(attach it) is shown.
i want after update primary key check for duplicate, if is not duplicate other field allowed fill
how can do this?
Use the BeforeUpdate event to check for existing value.
If Not IsNull(DLookup("fieldname","tablename","fieldname= " & Me.textbox)) Then
Cancel = True
MsgBox "ID already used."
End If
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.