Hi everyone,
How can I refere a record in a msgbox? I explain, let's say ;
Do you wish to Delete " Name of the client # 2 " (record number two) ?
I don't know what to put in the question marks? See below. Does anyone have an idea?
Here are my code:
Thanks,
Le
How can I refere a record in a msgbox? I explain, let's say ;
Do you wish to Delete " Name of the client # 2 " (record number two) ?
I don't know what to put in the question marks? See below. Does anyone have an idea?
Here are my code:
Code:
Private Sub cmdDelete_Click()
On Error GoTo Err_cmdDelete_Click
Dim response As Integer
response = MsgBox("Do you wish to Delete "????" ?", vbQuestion + vbYesNo)
If response = vbYes Then
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
MsgBox " Record had Deleted"
End If
Exit_cmdDelete_Click:
Exit Sub
Err_cmdDelete_Click:
MsgBox Err.Description
Resume Exit_cmdDelete_Click
End Sub
Thanks,
Le