ADO cat.Procedures("qapp_Eps0304").Command won't execute.


G

GPO

Hi All,

The following sub doesn't work anymore. It worked last
week and now it has stopped. The append query itself works
when you run it from the user interface. The parameters
look right. They seem to be getting picked up from the
form. The spelling of the query is right. But no data is
appended, and no error is generated. cnn, cat and cmd all
look right.

Sub AppendToEps _
(cnn As ADODB.Connection, cat As ADOX.Catalog)
'Appends new data to eps table
Dim cmd As ADODB.Command
On Error GoTo HandleError

Set cmd = cat.Procedures("qapp_Eps0304").Command
cmd.Execute , _
Array( _
Format(Forms![frm_Proc_Params]!
txtEp_From, "dd/mm/yyyy"), _
Format(Forms![frm_Proc_Params]!
txtEp_To, "dd/mm/yyyy"))

Exit Sub
HandleError:
MsgBox "Error appending to eps table." & vbCrLf & _
Err.Number & ": " & Err.Description
End Sub
 
Ad

Advertisements

G

GPO

Got it sorted. I stuck a * wild card in a filtering
criterion in the query. Wild cards are different in ADO...
 

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