P
pib311 via AccessMonster.com
Hi all.
I have an issue with a database that will be used by people that do not like
change and do not want to see things that don't make sense to them. So basic
users.
I am using the following code to open a query, copy all records, and paste
the results into a template in excel.
'Prepare database for current weeks Data
DoCmd.OpenQuery rst!query_name
DoCmd.RunCommand acCmdSelectAllRecords
DoCmd.RunCommand acCmdCopy
xlws.Range(rst!Range).PasteSpecial xlPasteValues
DoCmd.SetWarnings False
DoCmd.Close acQuery, rst!query_name, acSaveNo
DoCmd.SetWarnings True
Everything works great, the data is copied into Excel. The only issue is
that when the query opens and copies all records, you can see the open query.
Is there a way to open this to copy the records and paste the value in an
open excel template without them seeing the query run? This loops through a
few queries to create the final report.
Please assist. Thanks in advance.
I have an issue with a database that will be used by people that do not like
change and do not want to see things that don't make sense to them. So basic
users.
I am using the following code to open a query, copy all records, and paste
the results into a template in excel.
'Prepare database for current weeks Data
DoCmd.OpenQuery rst!query_name
DoCmd.RunCommand acCmdSelectAllRecords
DoCmd.RunCommand acCmdCopy
xlws.Range(rst!Range).PasteSpecial xlPasteValues
DoCmd.SetWarnings False
DoCmd.Close acQuery, rst!query_name, acSaveNo
DoCmd.SetWarnings True
Everything works great, the data is copied into Excel. The only issue is
that when the query opens and copies all records, you can see the open query.
Is there a way to open this to copy the records and paste the value in an
open excel template without them seeing the query run? This loops through a
few queries to create the final report.
Please assist. Thanks in advance.