I apologize in advance - I know this is a basic question but I absolutely can't find a way for this to work.
Currently I have a database I've made, with several processes of importing files, modifying the results, re-exporting files, etc. These are all done as part of a nearly-automated monthly process.
Most of these monthly processes pull from folder and file names with the numeric month in the name. So currently, I begin each function with:
Then I use variable Month within various string command texts (TransferText, RunSQL, etc.). For example, making a new table for the month:
I know there's a way to set up one global variable called glbMonth, in one module, that I call to in all of these other modules which I currently begin with the 2 lines above. However, I haven't gotten any of these to work.
How do I set up this global variable module? More importantly, how do I call this variable within these functions, so I can continue to use it the way I have (as text)?
Thanks for your help!!
P.S. This is my own personal database to make a monthly process automated, and having read the cons of global variables, I believe it will work for me in this minor use case.
Currently I have a database I've made, with several processes of importing files, modifying the results, re-exporting files, etc. These are all done as part of a nearly-automated monthly process.
Most of these monthly processes pull from folder and file names with the numeric month in the name. So currently, I begin each function with:
Code:
Dim Month As String Month = "09"
Code:
DoCmd.CopyObject , "Results_" & Month & "2010", acTable, "Results_EMPTY"
How do I set up this global variable module? More importantly, how do I call this variable within these functions, so I can continue to use it the way I have (as text)?
Thanks for your help!!
P.S. This is my own personal database to make a monthly process automated, and having read the cons of global variables, I believe it will work for me in this minor use case.
Comment