Username/password Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Need some assistance, I am trying to build a form where the user will have to
type in there
username and password. Now i have the table set up, i just need help in
coding.
I want it that
1) you only have 3 chances to type in the password correctly (msgbox should
pop up with
how many chances are left). if after the 3rd chance they didn't get it
correct, database will close.
If user gets it correctly, then the username will be passed to the next form..
 
thank you for you help, but now i have another question,
how can i take that user name and pass it to other forms, while having the
login form closed
 
You can create a global variable in a module to save the user name after the
Login

Global GlobUserName as String

When the login approved save the name from the text box to the variable

GlobUserName = Me.[Name Text Box]

Then create a function in a module to return the variable

Function Get_UserName()
Get_UserName = GlobUserName
End Function

Now, you can use the function every where in the database to return the user
name
 
THank you once again
I just have this one issue that maybe you can help me out
I did what you said and everything works perfectly
unfor, where GlobUserName = Me.[Name Text Box], it isn't a text box, but a
combo box. It has 2 columns, 1st being ID number and second the name. I
tried different routes where I would have a text box look @ tat combo box
value, but it is coming up only with teh ID #, not the name.
I can't change the combo box to have name first since that website you
suggested needs to have the ID first. this is my dilemna. Please advise.
Thanks


Ofer said:
You can create a global variable in a module to save the user name after the
Login

Global GlobUserName as String

When the login approved save the name from the text box to the variable

GlobUserName = Me.[Name Text Box]

Then create a function in a module to return the variable

Function Get_UserName()
Get_UserName = GlobUserName
End Function

Now, you can use the function every where in the database to return the user
name
--
\\// Live Long and Prosper \\//
BS"D


Justin said:
thank you for you help, but now i have another question,
how can i take that user name and pass it to other forms, while having the
login form closed
 
Try

Me.[Combo Name Text Box].Column(1)

The column number start from 0, so if the name is the second column in the
combo you should use column(1)

--
\\// Live Long and Prosper \\//
BS"D


Justin said:
THank you once again
I just have this one issue that maybe you can help me out
I did what you said and everything works perfectly
unfor, where GlobUserName = Me.[Name Text Box], it isn't a text box, but a
combo box. It has 2 columns, 1st being ID number and second the name. I
tried different routes where I would have a text box look @ tat combo box
value, but it is coming up only with teh ID #, not the name.
I can't change the combo box to have name first since that website you
suggested needs to have the ID first. this is my dilemna. Please advise.
Thanks


Ofer said:
You can create a global variable in a module to save the user name after the
Login

Global GlobUserName as String

When the login approved save the name from the text box to the variable

GlobUserName = Me.[Name Text Box]

Then create a function in a module to return the variable

Function Get_UserName()
Get_UserName = GlobUserName
End Function

Now, you can use the function every where in the database to return the user
name
--
\\// Live Long and Prosper \\//
BS"D


Justin said:
thank you for you help, but now i have another question,
how can i take that user name and pass it to other forms, while having the
login form closed

:

Check this link, I think it answer you question (needs)

http://www.databasedev.co.uk/login.html

--
\\// Live Long and Prosper \\//
BS"D


:

Need some assistance, I am trying to build a form where the user will have to
type in there
username and password. Now i have the table set up, i just need help in
coding.
I want it that
1) you only have 3 chances to type in the password correctly (msgbox should
pop up with
how many chances are left). if after the 3rd chance they didn't get it
correct, database will close.
If user gets it correctly, then the username will be passed to the next form..
 
no luck it just passes nothing

Ofer said:
Try

Me.[Combo Name Text Box].Column(1)

The column number start from 0, so if the name is the second column in the
combo you should use column(1)

--
\\// Live Long and Prosper \\//
BS"D


Justin said:
THank you once again
I just have this one issue that maybe you can help me out
I did what you said and everything works perfectly
unfor, where GlobUserName = Me.[Name Text Box], it isn't a text box, but a
combo box. It has 2 columns, 1st being ID number and second the name. I
tried different routes where I would have a text box look @ tat combo box
value, but it is coming up only with teh ID #, not the name.
I can't change the combo box to have name first since that website you
suggested needs to have the ID first. this is my dilemna. Please advise.
Thanks


Ofer said:
You can create a global variable in a module to save the user name after the
Login

Global GlobUserName as String

When the login approved save the name from the text box to the variable

GlobUserName = Me.[Name Text Box]

Then create a function in a module to return the variable

Function Get_UserName()
Get_UserName = GlobUserName
End Function

Now, you can use the function every where in the database to return the user
name
--
\\// Live Long and Prosper \\//
BS"D


:

thank you for you help, but now i have another question,
how can i take that user name and pass it to other forms, while having the
login form closed

:

Check this link, I think it answer you question (needs)

http://www.databasedev.co.uk/login.html

--
\\// Live Long and Prosper \\//
BS"D


:

Need some assistance, I am trying to build a form where the user will have to
type in there
username and password. Now i have the table set up, i just need help in
coding.
I want it that
1) you only have 3 chances to type in the password correctly (msgbox should
pop up with
how many chances are left). if after the 3rd chance they didn't get it
correct, database will close.
If user gets it correctly, then the username will be passed to the next form..
 
never mind my other post, it works, thanks again

Ofer said:
Try

Me.[Combo Name Text Box].Column(1)

The column number start from 0, so if the name is the second column in the
combo you should use column(1)

--
\\// Live Long and Prosper \\//
BS"D


Justin said:
THank you once again
I just have this one issue that maybe you can help me out
I did what you said and everything works perfectly
unfor, where GlobUserName = Me.[Name Text Box], it isn't a text box, but a
combo box. It has 2 columns, 1st being ID number and second the name. I
tried different routes where I would have a text box look @ tat combo box
value, but it is coming up only with teh ID #, not the name.
I can't change the combo box to have name first since that website you
suggested needs to have the ID first. this is my dilemna. Please advise.
Thanks


Ofer said:
You can create a global variable in a module to save the user name after the
Login

Global GlobUserName as String

When the login approved save the name from the text box to the variable

GlobUserName = Me.[Name Text Box]

Then create a function in a module to return the variable

Function Get_UserName()
Get_UserName = GlobUserName
End Function

Now, you can use the function every where in the database to return the user
name
--
\\// Live Long and Prosper \\//
BS"D


:

thank you for you help, but now i have another question,
how can i take that user name and pass it to other forms, while having the
login form closed

:

Check this link, I think it answer you question (needs)

http://www.databasedev.co.uk/login.html

--
\\// Live Long and Prosper \\//
BS"D


:

Need some assistance, I am trying to build a form where the user will have to
type in there
username and password. Now i have the table set up, i just need help in
coding.
I want it that
1) you only have 3 chances to type in the password correctly (msgbox should
pop up with
how many chances are left). if after the 3rd chance they didn't get it
correct, database will close.
If user gets it correctly, then the username will be passed to the next form..
 
Back
Top