running VBA code to run Crosstab query

I

iccsi

Dim strMYSQL As String
Dim rs As DAO.Recordset

strMYSQL = " SELECT * FROM MyCrosstab"
Set rs = CurrentDb.OpenRecordset(strMYSQL)

I have above code to assign my crosstab query to my recordset and I
got "Too Few Parameters expected 0" Error 3061.

I ran the crosstab query and set breakpoint which does not return
records.

I ran again after I end the debug and the crossstab returns records.

Is it possible that I can not ran the corsstab query in VBA code?

If I am on the wrong track, how should I run the crosstab query in my
VBA code.


Your help is great appreciated,
 

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