Hello everyone and thanks for reading this.
Im developing a database and theres one part of it i seem to be seriously struggling on as im new to VBA.
My system as a login that is hard coded into a form and draws from a query in the database.
What i would like to do is declare a global variable that i can store the username in and use that variable in other forms.
Ive never used global variables before. Ive looked at other sights and know how to declare a global variable, but do not understand how i can set the list values of usernames to it.
Ive declared a glaobal variable in a module names UserSession like
'Global UserSession as String'
The form with a list of usernames has the syntax
List0.value = UserSession
but this fails to work
Can anyone assist? Thankyou in advance!
Im developing a database and theres one part of it i seem to be seriously struggling on as im new to VBA.
My system as a login that is hard coded into a form and draws from a query in the database.
What i would like to do is declare a global variable that i can store the username in and use that variable in other forms.
Ive never used global variables before. Ive looked at other sights and know how to declare a global variable, but do not understand how i can set the list values of usernames to it.
Ive declared a glaobal variable in a module names UserSession like
'Global UserSession as String'
The form with a list of usernames has the syntax
List0.value = UserSession
but this fails to work
Can anyone assist? Thankyou in advance!