I have a public variable declared in MS Access that I use in several queries to export the data to CSV files. And it works fine with the initial declaration, but I was trying to see if there was a way to change the value of the public variable so I could run the same set of queries with the new value.
For example I would declare the public variable as
Public Function GBL_StoreCode()
GBL_StoreCode = "ABC"
Then run the queries with that function and all is good. But then I want to change the value of GBL_StoreCode to "XYZ" and rerun the queries with that value. But I get a runtime error 424.
Do you have any suggestions on what I can try?
Thanks in advance