LouisPrefersExcel
New member
- Local time
- Today, 17:22
- Joined
- Jun 29, 2021
- Messages
- 6
Hi Everyone,
So my issue currently is:
I would like to run a macro to call a query from a database that contains a lot of information I need for what I am doing (this separate database is owned by someone else and multiple people input data into it). I have setup a query in this separate database that extracts only the data I need (though it takes 40 seconds or so to run), I was then planning on setting up a macro to run this query and export the results as a text file so that I can import the data from the text file back into my database.
I have found some code to put into Access' VBA to export the query to .txt and name it with a pre-set file path but at the moment I can't even export the query to a text file as I am getting the message "There isn't enough memory to perform this operation. Close unneeded programs and try the operation again.". The reason I was exporting first is so that I could save the export steps and use this name in the VBA code.
I have tried closing everything and reopening Access and trying again, but no luck. The weird thing is that I can export to Excel immediately.
Is what I'm currently trying to do the best way to import data from a different database's query into my own database, or is there a better alternative? And does anybody know why I can't export my query as a text file?
Thank you all in advance.
So my issue currently is:
I would like to run a macro to call a query from a database that contains a lot of information I need for what I am doing (this separate database is owned by someone else and multiple people input data into it). I have setup a query in this separate database that extracts only the data I need (though it takes 40 seconds or so to run), I was then planning on setting up a macro to run this query and export the results as a text file so that I can import the data from the text file back into my database.
I have found some code to put into Access' VBA to export the query to .txt and name it with a pre-set file path but at the moment I can't even export the query to a text file as I am getting the message "There isn't enough memory to perform this operation. Close unneeded programs and try the operation again.". The reason I was exporting first is so that I could save the export steps and use this name in the VBA code.
I have tried closing everything and reopening Access and trying again, but no luck. The weird thing is that I can export to Excel immediately.
Is what I'm currently trying to do the best way to import data from a different database's query into my own database, or is there a better alternative? And does anybody know why I can't export my query as a text file?
Thank you all in advance.