filter and export file doesnt get desired result

G

Guest

Yikes! mistakenly thought I could use the filter and then export in order to
create a subset of the table I am working with. I have now created a form
where the user can select their criteria - which I will use to create an SQL
statement and a recordset. So what should be my next step? Creating a make
table query or passthrough query? Would I be able to export to .xls or is a
table my only choice? Does anyone know a good web site where I can see an
example? Thanks for your help and suggestions....
 
D

Douglas J. Steele

My suggestion would be to create a query, dynamically regenerate the SQL
associated with that query and export the query.

You can change the SQL associated with a query using code like:

Dim qdfCurr As DAO.QueryDef

Set qdfCurr = CurrentDb().Queries("MyQuery")
qdfCurr.SQL = strNewSQL
 
G

Guest

Well, I finally got to the point where I put this code in and I got an error:
Method or data member not found (Error 461) [it highlights the ".Queries"]
This is my line of code:
Set qdfCurr = CurrentDb().Queries("qryInsBarbellNVB")
and I have DAO 3.6 Object Library in the references
any ideas?
Thanks a bunch...
 

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