global variable

  • Thread starter Thread starter grace
  • Start date Start date
G

grace

Guest
I have set up two global variables in my access application, UserID, TicketID. whenever a user logs into the system, these two variables will be set to proper value. The userid variable never changes during the session; and the TicketID variable is changed whenever user adds a new ticket into the application. The problem with these global variables are sometimes, they just become NULL. I hope somebody can tell me what I should do to avoid it from happen, or what should I pay attention to when using global variables.
 
Proper programmer's response:

Don't ever use global variables. Any variables you need access to (bad pun - I deserve to be drug out into the street and shot) or change you should pass as parameters.

Practical programmer's response:

Be careful if you use them.

What I say:

If you don't use them, fine. If you do, just be careful.

- Matt

[This message has been edited by Matt Leidemer (edited 06-14-2000).]
 

Users who are viewing this thread

Back
Top Bottom