First of all, thanks for your help in advance.
I am a new user of VBA in Access, so I am not sure how to declare global variables in VBA in Access.
More specifically, I have created many "private Sub_xxx" for all forms in Access. But I would like those forms to be able to fetch and change a common variable (so I need a global variable).
I have tried to declare as:
Static variable_name As Integer
But, it does not work.
I have also tried to declare a variable in a module, say Module_1. But it also does not work.
Sorry that my question is a bit long, but can you please tell me specifically how to declare a global variable which can be shared among all "private Sub form0x"?
Thanks a lot!
I am a new user of VBA in Access, so I am not sure how to declare global variables in VBA in Access.
More specifically, I have created many "private Sub_xxx" for all forms in Access. But I would like those forms to be able to fetch and change a common variable (so I need a global variable).
I have tried to declare as:
Static variable_name As Integer
But, it does not work.
I have also tried to declare a variable in a module, say Module_1. But it also does not work.
Sorry that my question is a bit long, but can you please tell me specifically how to declare a global variable which can be shared among all "private Sub form0x"?
Thanks a lot!