I was recently introduced to modules. I am looking to occasionally refresh some data and have created a module with a class called DataSet
I put this in my App.open and it works within the event handler.
[quote] dataset = new SpyglassDBModule.DataSet()
[/quote]
But this dataset variable is not accessible in my window methods, so I won’t be able to set, get data.
I can’t quite figuire out how to make SpyglassDBModule.DataSet() accessible to the whole app. I will be populating an array with statistical data from a database.
How did you define the dataset variable? If you dim it in the app.Open event, then it’s only available in that event. You should make it a property of your module. Then remove the dim statement (if any) from app.Open and leave only
dataset = new SpyglassDBModule.DataSet()
in app.Open. dataset will now be available everywhere in your program.
Tim, you are right. I had it set in the app, not the module. Re-reading your original post, you clearly stated to make it a property of the module. All squared away now.