I am trying to rename a file and save it based on some data in one of the queries contained in Access. I have the Database built, and most of the functions are in Access itself, but I want to set it up to open a file from a specific folder (which I have done with no problems), then copy the file to a Completed folder and rename it with two fields from a query.
I have a query that has one row with two columns of data, the month and year of the data. I want to have VB rename the file so that it changes it from UseTax.xls to UseTax-Oct-2003.xls and saves it to a different folder.
Copying the file and renaming it are no problem, but how can I access this query data from VB?
I have the query set up as FILE DATA, and the above info is all it will contain for each month (OCT and 2003 in the above example). I know that this should be very simple, but I am having problems just figuring out how to access the data records in the queries and tables (as I said I am new to VBA for Access). Any help would be greatly appreciated.
If more info is required let me know and I can provide it.
Thanks,
Chris Huss
CWU Accounting
I have a query that has one row with two columns of data, the month and year of the data. I want to have VB rename the file so that it changes it from UseTax.xls to UseTax-Oct-2003.xls and saves it to a different folder.
Copying the file and renaming it are no problem, but how can I access this query data from VB?
I have the query set up as FILE DATA, and the above info is all it will contain for each month (OCT and 2003 in the above example). I know that this should be very simple, but I am having problems just figuring out how to access the data records in the queries and tables (as I said I am new to VBA for Access). Any help would be greatly appreciated.
If more info is required let me know and I can provide it.
Thanks,
Chris Huss
CWU Accounting