abenitez77
IS-IT--Management
I am creating a querydef in ms access to retrieve data from a multimillion rec table. I query the table to retrieve only thousands. I want to be able to create a table in ms access from the query returned by the querydef. How can I do this?
My code:
Set qODBC = d.CreateQueryDef(sqODBC, sql)
sConnectDAO = "ODBC;Description=ANP NON NATIVE CLIENT;DRIVER=SQL Server;SERVER=USATL02PRSQ70;Trusted_Connection=Yes ;DATABASE=A_and_P_STORES_DSD_2010_DSD_W"
qODBC.Connect = sConnectDAO
zODBC.sql sql
qODBC.Close
DoCmd.OpenQuery "qry_ANP_DSD_201007"
My code:
Set qODBC = d.CreateQueryDef(sqODBC, sql)
sConnectDAO = "ODBC;Description=ANP NON NATIVE CLIENT;DRIVER=SQL Server;SERVER=USATL02PRSQ70;Trusted_Connection=Yes ;DATABASE=A_and_P_STORES_DSD_2010_DSD_W"
qODBC.Connect = sConnectDAO
zODBC.sql sql
qODBC.Close
DoCmd.OpenQuery "qry_ANP_DSD_201007"