Public Sub DeleteCust(lngID As Long) Dim cmd As ADODB.Command
Set cmd = New ADODB.Command
With cmd
.ActiveConnection = CurrentProject.Connection
.CommandText = "qryDeleteCompany"
.CommandType = adCmdStoredProc
.Execute , Parameters:=lngID End With End Sub