Forum Discussion
GeorgieAnne
Mar 26, 2025Iron Contributor
How to make a Saved Export
Hello All, My very first post in the MS-Access lounge. I need to automate these steps: Press F-11 to get to the All Access Objects pane. Select a Table named Priority The Priority table has a D...
arnel_gp
Mar 27, 2025Iron Contributor
you can't use an SQL string in any Transfer() functions.
create a Query and use the Query in your Transfer.
example:
SELECT * FROM Priority Where YourDateField = Date;save the query (say Query1).
now use Query1 to your TransferSpreadsheet.
(this will save to Priority.xlsx in Documents folder)
Docmd.TransferSpreadsheet acExport,acSpreadsheetTypeExcel12Xml,"Query1",environ$("userprofile") & "\Documents\Priority.xlsx"
XPS35
Mar 27, 2025Iron Contributor
I was not sure about that and was not able to test it at the moment. Thanks for the the improvement.