I'm using the following and getting an "Object Required" error on the cmd.Parameters.Append line of code. I can't for the life of me figure out why. Can anyone help?

Dim conn As ADODB.Connection 
Dim cmd As ADODB.Command 
Dim  records As ADODB.Recordset 
Dim par As ADODB.Parameter 
 
Set conn = New ADODB.Connection 
conn.ConnectionString = "..." 
conn.Open 
 
Set cmd = New ADODB.Command 
cmd.ActiveConnection = conn 
cmd.CommandText = "..." 
cmd.CommandType = adCmdStoredProc 
Set par = cmd.CreateParameter("@p", adInteger, adParamOutput, 10, 0) 
cmd.Parameters.Append (par) 
 
Set records = New ADODB.Recordset 
Set records = cmd.Execute
Also posted on Ozgrid