I have a access 2003 database. I have set up a global variable in Module1. The reason I set it was to indicate what location the access database is using. I have 3 access databases that are using the same DB structure. Oh, I used a global variable because different areas of the DB runs the reports in a different way (sometimes Outputto, sometimes Openform from another form).
Here is how I set it up in Module1
Global strLocation As String
Here is the weird part, I set strLocation = "PKS" in the form load event of the default form that loads. When I have the automated reports launch, I concatenate strLocation & strFilename (which looks like this... PKS - Monthly Reports.rtf). It works sometimes but other times I see the reports come across like ( - Monthly Reports.rtf). In other words, it seems to lose the global variable and other times it seems to use it just fine.
Any ideas would be greatly appreciated as this is driving me mad!
-Stoss
Here is how I set it up in Module1
Global strLocation As String
Here is the weird part, I set strLocation = "PKS" in the form load event of the default form that loads. When I have the automated reports launch, I concatenate strLocation & strFilename (which looks like this... PKS - Monthly Reports.rtf). It works sometimes but other times I see the reports come across like ( - Monthly Reports.rtf). In other words, it seems to lose the global variable and other times it seems to use it just fine.
Any ideas would be greatly appreciated as this is driving me mad!
-Stoss