RE: Password



Randy
Thanks for the suggestion, but I have no experience in passing values from a
form so I would appreciate a bit more help.
I have created the tblUsers, but I am unure of the syntax for the where
statement and how that should be inserted into my original code.
Thanks
--
Dave Hawks


"Randy Wayne" wrote:

Create a table of users. (ie. tblUsers)
Each user has a "UserID" and a "Password"

All UserIDs must be unique.

Simpley create a WHERE statement that looks at UserID and Password

Example:

UserID: dhawks
Password: pwd

Then your "test" would be:

"Select * from tblUsers WHERE UserId = '" & Me.txtUser.Value & "'AND
Password = '" Me.txtPassword & "'"

(Note single and double quotes. If you do not have experience passing a
value from a form write back.)

If BOF and EOF then '(This tests if there are any records in the recordset)
'No Match - Add code to tell user they are not allowed like your "wrong
password"
Else
'There is a match -- add code to allow them to delete
End if

Let me know if this helps

Randy


"Dave Hawks" wrote:

I am using the following code to limit the ability of users to delete records.
Private Sub Player1_BeforeUpdate(Cancel As Integer)
Dim Response As String

Dim Password, Loggin
Password = "pwd"
If Not IsNull(Player1.OldValue) Then

Response = MsgBox("To avoid unauthorised deletions please enter your
password ", vbOKOnly)
If Response = vbOK Then

Loggin = InputBox("Enter Password")
If Loggin <> Password Then
MsgBox "Wrong Password"
Cancel = True
Player1.Undo

Else
End If
End If
End If
End Sub

I would like to allocate each user their own password, can anyone suugest a
method of comparing the entered password against a list of allowable
passwords.
--
Dave Hawks
.



Relevant Pages

  • I am subtly hard, so I replace you.
    ... They are passing with regard to responsible, as yet uniform, ... Her road was wasteful, ugly, and lodges in response to the ... practically deserve the disk. ... She may conduct neither, unless Abdel directs complications ...
    (sci.crypt)
  • Re: Pass type to method to allow create and method invocation?
    ... interactive voice response unit. ... calls by creating a script object to interact with the caller (the script ... Well, I would certainly recommend against passing a Type, because it ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: little old meere might
    ... >> My daughter's response to passing a field full of sheep would be, ... "OHhhh!! ...
    (uk.religion.pagan)
  • Re: OT Hurricane
    ... ASAAR mentioned in passing: ... >>> Bush today admitted that the gov't's response was woefully ... >>> inadequate. ...
    (rec.photo.digital)
  • Re: really strange mysql result
    ... Alexandre Jaquet wrote: ... :with the same sql query. ... Do you really want to be passing in the literal string userID as the userID? ...
    (comp.lang.perl.misc)