G
Guest
Hi,
Currently with the lines I have here, if I try to save identical value in
the primary key field, Access will force me to debug, but I'd really need a
long term solution to this frquently occuring problem...
Private Sub cmbSave_Click()
' First save the changes or new record
' this line will force the currently edited record to be written to disk,
' without moving to the first record in the form's recordsource
If Me.Dirty = True Then Me.Dirty = False
End Sub
What I have in mind is that if the value entered in the primary key field
already exists, then when the Save button is clicked, a message box (with a
descriptive message and only Yes button available to abort the saving action)
will pop up.
How can this be executed?
Regards,
Sam
Currently with the lines I have here, if I try to save identical value in
the primary key field, Access will force me to debug, but I'd really need a
long term solution to this frquently occuring problem...
Private Sub cmbSave_Click()
' First save the changes or new record
' this line will force the currently edited record to be written to disk,
' without moving to the first record in the form's recordsource
If Me.Dirty = True Then Me.Dirty = False
End Sub
What I have in mind is that if the value entered in the primary key field
already exists, then when the Save button is clicked, a message box (with a
descriptive message and only Yes button available to abort the saving action)
will pop up.
How can this be executed?
Regards,
Sam