custom delete message

kingsgambit

Registered User.
Local time
Today, 15:37
Joined
May 27, 2001
Messages
134
When i delete a record from a sub form on my main form, can you have the message say which record is being deleted i.e are yousure you what to delete item no 123
 
This should do the trick:

Dim StdResponse As Integer

StdResponse = MsgBox("You are deleting Record No " & Me.RecordID & " Are you sure", 0 + 4 + 256, "")

If StdResponse = vbYes Then
...delete code here...
Else '(Default)
... do nothing...
End If

Change RecordID for the name of your control that has the unique record ID.

hth,
Jack
 

Users who are viewing this thread

Back
Top Bottom