Hi,
I am trying to use the following code for deleting records in a table:
It results in the error: No value given for one or more required parameters.
Any idea what is missing?
Thanks.
I am trying to use the following code for deleting records in a table:
Code:
Dim adoCMD As Object
Dim adoRS As Object
Dim strSQL As String
Dim adoERR As ADODB.Error
'Define a query to DELETE records from table
strSQL = "DELETE FROM [" & "tblStrategy" & "] WHERE [StrategyName] = " & Forms(formName).cmb_RemoveStrategy.Value
'Define attachment to database table specifics
Set adoCMD = CreateObject("ADODB.Command")
With adoCMD
.ActiveConnection = CurrentProject.Connection
.CommandType = adCmdText
.CommandText = strSQL
Set adoRS = .Execute
End With
It results in the error: No value given for one or more required parameters.
Any idea what is missing?
Thanks.