Hi,
When I run this code, it works fine, but I get a value of "#Deleted" in the controls. What am I doing wrong? Thanks!
When I run this code, it works fine, but I get a value of "#Deleted" in the controls. What am I doing wrong? Thanks!
Code:
If MsgBox("Are you sure you would like to delete History" & _
" from this record only", vbQuestion + vbYesNo,= vbYes Then
Dim cmd As ADODB.Command
Set cmd = New ADODB.Command
cmd.ActiveConnection = CurrentProject.Connection
cmd.CommandText = "DELETE FROM tblPre WHERE Number = '" & Me.[Ratio Number] & "'"
cmd.Execute
Me.Refresh
Else
End If