473,394 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Can't connect to table with password to compare with user input

This might be really simple but for the life of me I cannot get this to work.

What I am trying to do is use a table with one field as a password. I however cannot connect to it from a module to compare user input with stored password.

How can I accomplish this?
Dec 3 '07 #1
7 1346
Dan2kx
365 100+
you could use a dlookup in vb

dim PassLook as string

Passlook = dlookup("PasswordField",PasswordTable,"WhereComman d(if you only have the one password in the field then i think you can forget this)")

if [Forms]![Formname]![UserInput] = Passlook then

Blah blah

else
msgbox"incorrect password"
end if

hows that?
Dec 3 '07 #2
Nathan H
104 100+
you could use a dlookup in vb

dim PassLook as string

Passlook = dlookup("PasswordField",PasswordTable,"WhereComman d(if you only have the one password in the field then i think you can forget this)")

if [Forms]![Formname]![UserInput] = Passlook then

Blah blah

else
msgbox"incorrect password"
end if

hows that?

Instead of holding the password value in a table, you can try:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command_Click()
  2. If Text1 = "Password" Then
  3. MsgBox "Password Confirmed", vbOKOnly
  4. Exit Sub
  5. End If
  6. MsgBox "You Entered the Wrong Password", vbOKOnly
  7. End Sub
  8.  
Dec 3 '07 #3
you could use a dlookup in vb

dim PassLook as string

Passlook = dlookup("PasswordField",PasswordTable,"WhereComman d(if you only have the one password in the field then i think you can forget this)")

if [Forms]![Formname]![UserInput] = Passlook then

Blah blah

else
msgbox"incorrect password"
end if

hows that?


Works like a charm... but what if i want to write a password to that field.
Dec 3 '07 #4
Instead of holding the password value in a table, you can try:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command_Click()
  2. If Text1 = "Password" Then
  3. MsgBox "Password Confirmed", vbOKOnly
  4. Exit Sub
  5. End If
  6. MsgBox "You Entered the Wrong Password", vbOKOnly
  7. End Sub
  8.  

That is what i have... i wanted to be able to put it in a table so that i can be able to change it in the future without having to go into the code...
Dec 3 '07 #5
Nathan H
104 100+
That is what i have... i wanted to be able to put it in a table so that i can be able to change it in the future without having to go into the code...

How about having your password table as the record source of the sign-in screen, and then...obviously not displaying the stored password field:

Private Sub Command_Click()
If Text1 = (Forms!Form1!PASSWORD) Then
MsgBox "Password Confirmed", vbOKOnly
Exit Sub
End If
MsgBox "You Entered the Wrong Password", vbOKOnly
End Sub
Dec 3 '07 #6
Dan2kx
365 100+
Works like a charm... but what if i want to write a password to that field.
if you change the password in the field then it will lookup the new one

you could also add in a username field so that you had more than one user in which case you could the "where" command to check the username too
"tblpassinfo.username =[forms]![frmpassform]![username]"
Dec 3 '07 #7
Nathan H
104 100+
if you change the password in the field then it will lookup the new one

you could also add in a username field so that you had more than one user in which case you could the "where" command to check the username too
"tblpassinfo.username =[forms]![frmpassform]![username]"

Dan2kx- I like your method better then mine! I have changed over to the dlookup route so that my password table is not tied to the form. Thanks!
Dec 3 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Shufen | last post by:
Hi, I'm a newbie that just started to learn python, html and etc. I have some questions to ask and hope that someone can help me on. I'm trying to code a python script (with HTML) to get...
11
by: Heather | last post by:
I need suggestions on possible ways to implement the following: 10 users on a network need to infrequently add data to a backend database on the network. The data would be a couple of records...
18
by: Jen | last post by:
I'm using Microsoft's own VB.NET FTP Example: http://support.microsoft.com/default.aspx?scid=kb;en-us;832679 I can get the program to create directories, change directories, etc., but I can't...
4
by: Skeets | last post by:
i have an application that should allow acces to linux administrators only. iow, i want to code a php script that will be able to compare the entered password with the linux adminstrator's...
14
by: Marcus | last post by:
I have a function that simply returns TRUE if it can connect to a particular Sql Server 2005 express, or FALSE if it cannot. I am getting some strange error codes returned when the computer that...
3
by: hary08 | last post by:
im doing a database for Hospital Admission, I have a log in form which prompt user for a password. The source of log in is to look for the values in my Table tblEmployees and match user name and...
2
by: phopman | last post by:
I have a beautiful, dynamic and very attractive front page: <?php error_reporting(E_ALL); ini_set('display_errors', '1'); include '../../db.inc'; $id = intval( mysql_real_escape_string(...
9
by: Dhiru1009 | last post by:
Hi guys, I am trying to build a user registration form using PHP and MYSQL but encountring a problem. When I click on submit with empty fields it adds records to database also it doesn't matter...
7
by: Dhiru1009 | last post by:
Hi guys, I need help with validating the user to see if the username exists in database table or not. Here is my code. default.php <form name="form1" action="authenticate.php">
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.