Parameter query (too few parameters)

J

jeb

I have a form in which the users enter the parameters for an append query (a
combo box and a text box). I wanted to try running the query in code but it
doesn't seem to know about the form. The code is this:

Dim cmd as ADODB.Command
Set cmd = New ADODB.Command

Dim rst As ADODB.Recordset

With cmd
.ActiveConnection = CurrentProject.Connection
.CommandText = "qryDatePrimary"
.CommandType = adCmdStoredProc
.Execute
End With

What do I need to add to tell it about the parameters on the form? Also,
when I split the database and the query uses a linked table, will I need to
change the connection? Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top