I'm trying to add a button that will allow users to delete all data they previously entered for a particular client. I am getting an error saying that Access couldn't find the expression "|" referred in my code. I suspect it is because I may have the string all wrong.
Here is my code.
TIA for insights.
Here is my code.
Code:
Dim ClientID As Long
ask = MsgBox(["This will delete all I & R info for this client. Do you want to continue?"], [vbYesNo], ["Alert!"]) = vbYes
If ask = 6 Then
ClientID = Me.ClientID
sSql = "DELETE ClientIR.ClientID FROM ClientIR WHERE (((ClientIR.ClientID)=&ClientID&));"
DoCmd.RunSQL sSql
DoCmd.Close
Else
TIA for insights.