Hi guys, ok I have a login screen, it is using a combobox (cmbUser) as the username field....
I want to make a global variable called strUser, when I select the user, enter the password the hit login I want the value held in cmbUser assigned to strUser so I can use this throughout my other forms to make my delete button visible using an if statement on each form load sub
From googling things I think I create the global variable using module like this.....?
Option Explicit
Public strUser As String
I already have code attached to the login button to validate the user, so I tried to attach........
strUser = cmbUser
To the code, obviously it never worked tho
I am pretty new to coding in access as u can probably tell and I would be grateful if anyone can help me with this (or tell me I'm barking up the wrong tree)
I want to make a global variable called strUser, when I select the user, enter the password the hit login I want the value held in cmbUser assigned to strUser so I can use this throughout my other forms to make my delete button visible using an if statement on each form load sub
From googling things I think I create the global variable using module like this.....?
Option Explicit
Public strUser As String
I already have code attached to the login button to validate the user, so I tried to attach........
strUser = cmbUser
To the code, obviously it never worked tho

I am pretty new to coding in access as u can probably tell and I would be grateful if anyone can help me with this (or tell me I'm barking up the wrong tree)