L
Lez
Hi Guys,
I have a login form which I use to set various user variables as below:
If Me.txtPassword = Me.cboUser.Column(2) Then
UsrName = Me.cboUser.Column(1)
UsrPass = Me.cboUser.Column(2)
UsrUserID = Me.cboUser.Column(0)
UsrLevelID = Me.cboUser.Column(3)
UsrLocID = Me.cboUser.Column(4)
DoCmd.Close acForm, "frmLogin"
I have got a public module to store these variables:
Public UsrName
Public UsrPass
Public UsrUserID
Public UsrLevelID
Public UsrLocID
Function GetUsrName()
GetUsrName = UsrName
End Function
Function GetUsrPass()
GetUsrPass = UsrPass
End Function
Function GetUsrUserID()
GetUsrUserID = UsrUserID
End Function
Function GetUsrLevelID()
GetUsrLevelID = UsrLevelID
End Function
Function GetUsrLocID()
GetUsrLocID = UsrLocID
End Function
The problem I am having is that the UsrLocID variable simply returns 'null'
despite the field having a value...I am missing something very simple here
or is there another issue going on? can I only get a limited number of
variables ? I can confirm that column(4) is the correct column.
Many thanks
I have a login form which I use to set various user variables as below:
If Me.txtPassword = Me.cboUser.Column(2) Then
UsrName = Me.cboUser.Column(1)
UsrPass = Me.cboUser.Column(2)
UsrUserID = Me.cboUser.Column(0)
UsrLevelID = Me.cboUser.Column(3)
UsrLocID = Me.cboUser.Column(4)
DoCmd.Close acForm, "frmLogin"
I have got a public module to store these variables:
Public UsrName
Public UsrPass
Public UsrUserID
Public UsrLevelID
Public UsrLocID
Function GetUsrName()
GetUsrName = UsrName
End Function
Function GetUsrPass()
GetUsrPass = UsrPass
End Function
Function GetUsrUserID()
GetUsrUserID = UsrUserID
End Function
Function GetUsrLevelID()
GetUsrLevelID = UsrLevelID
End Function
Function GetUsrLocID()
GetUsrLocID = UsrLocID
End Function
The problem I am having is that the UsrLocID variable simply returns 'null'
despite the field having a value...I am missing something very simple here
or is there another issue going on? can I only get a limited number of
variables ? I can confirm that column(4) is the correct column.
Many thanks