Hi,
Thank you in advance for your assistance
I am trying to run the code below when the user attempts to delete a record,
however I receive
'Compile Error: Expected sub,function or property'
Code:
Private Sub Form_Delete(Cancel As Integer)
Dim intanswer As Integer
Dim stranswer As String
stranswer "Are you sure you want to delete this product?"
intanswer = MsgBox(Str, vbQuestion + vbYesNo, "Delete Product")
If intanswer = vbYes Then
RunCommand acCmdSelectReport
DoCmd.RunCommand acCmdDeleteRecord
End If
HandleError:
MsgBox "Error is " & Err.Description
Resume exithere
End Sub