|
-
Nov 1st, 2000, 08:52 AM
#1
Thread Starter
Member
ok i have a general, well not so general question. i am creating a program that is password protected.. there are multiple users. it works just fine by itself. but they want to change there passwords to there own and i dont know exactly how to get this done. I have coded there username and password into the program and was wondering if there is a way to update the code during runtime or at least temp storage and then when they close the program it copies the new password to there variable i will paste my code for the password page since i havent the faintest idea on how to get the change password to work
thanks
Dim mystring As String
Dim title As String
Dim msg As String
Dim reply As Integer
Dim flags As String
Dim laura As String
Dim laurap As String
Dim surveillance As String
Dim surveillancep As String
Dim slots As String
Dim slotsp As String
Dim administrator As String
Dim administratorp As String
Private Sub CmdCancel_Click()
Call cleanscreen
CmdChangePWD.Enabled = False
End Sub
Private Sub CmdChangePWD_Click()
'goes to the password change form username and password is still needed to verify then txtbox for new password will appeaar
frmpassword.Visible = False
frmPasswordChange.Visible = True
frmPasswordChange.txtOldPassword.Text = frmpassword.txtPassword.Text
End Sub
Private Sub cmdEnter_Click()
laura = "laura"
laurap = "aaaa"
surveillance = "surveillance"
surveillancep = "surv"
slots = "slots"
slotsp = "lvd"
administrator = "administrator"
administratorp = "leeper"
mystring = txtEmpID.Text
If txtEmpID.Text = laura And txtPassword.Text = laurap Then
mystring = "Laura"
CmdChangePWD.Enabled = True
Call Welcome
ElseIf txtEmpID.Text = surveillance And txtPassword.Text = surveillancep Then
CmdChangePWD.Enabled = True
mystring = "Surveillance"
Call Welcome
ElseIf txtEmpID.Text = slots And txtPassword.Text = slotsp Then
CmdChangePWD.Enabled = True
mystring = "Slot"
Call Welcome
ElseIf txtEmpID.Text = administrator And txtPassword.Text = administratorp Then
CmdChangePWD.Enabled = True
mystring = "God"
Call Welcome
Else
Text = "Incorrect Password"
msg = "You Have Entered An Incorrect Password"
flags = vbOKOnly
reply = MsgBox(msg, flags, title)
cleanscreen
End If
End Sub
Private Sub CmdExit_Click()
End
End Sub
Private Sub Form_Load()
CmdChangePWD.Enabled = False
End Sub
Private Sub cleanscreen()
txtEmpID.Text = ""
txtPassword.Text = ""
mystring = ""
End Sub
Private Sub Welcome()
Text = "Welcome"
msg = "Welcome Back " & mystring & ""
flags = vbOKOnly
reply = MsgBox(msg, flags, title)
If keyascii = vbOKOnly Then
'cleanscreen
'CmdChangePWD.Enabled = False
End If
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|