C
Ciara
Hi
I am very new to vba and so need a bit of guidance on the best
approach.
I have an access query that needs to be run every day and the results
emailed as a delimited csv file, which I would like to automate.
I know that I can copy the sql string into vba to run the query (not
sure if I need to do this or is it better to have a saved query)and use
the transfer text method of the do cmd to copy the results but how do I
then email the saved file? Also the file has a unique name based on the
current date run. I know I can create a variable to do this ,but not
sure how. Thirdly I know i can use Windows task scheduler to run it
daily, but is this the best approach.
There are examples of doing one of the tasks, but I have trouble
putting it all together.If anyone has an example of these techniques it
would be very much appreciated. -C
I am very new to vba and so need a bit of guidance on the best
approach.
I have an access query that needs to be run every day and the results
emailed as a delimited csv file, which I would like to automate.
I know that I can copy the sql string into vba to run the query (not
sure if I need to do this or is it better to have a saved query)and use
the transfer text method of the do cmd to copy the results but how do I
then email the saved file? Also the file has a unique name based on the
current date run. I know I can create a variable to do this ,but not
sure how. Thirdly I know i can use Windows task scheduler to run it
daily, but is this the best approach.
There are examples of doing one of the tasks, but I have trouble
putting it all together.If anyone has an example of these techniques it
would be very much appreciated. -C