So.. This code is working and the form works great, but I would like to add a small extra feature. I currently have to manually go in and set the "password" in the code. I would like to make a simple form that will have the "password" in a text box/listbox or whatever so the admin could change the password without having to go into the code. I'm very weak at coding but my guess was something like this.
If PassWord = "gpc" Then--------old
If PassWord = "[passwordtable].[password]" Then-----would this work?
Code:
Private Sub Form_Load()
Dim PassWord As String
PassWord = InputBox("Enter Password to gain full access or click OK to view this GPC account with limited rights.")
If PassWord = "gpc" Then
' Open Form
Me.Date_Requested.Locked = False
Me.AO.Locked = False
Me.Paid.Locked = False
Me.Vendor.Locked = False
Me.Description.Locked = False
Me.Debit.Locked = False
Me.Requestor.Locked = False
Me.Status.Locked = False
Me.Reconciled.Locked = False
Me.Basic_Amount.Locked = False
Me.Catagory.Locked = False
cmdNewTask.Visible = True
Command139.Visible = True
Me.Reconciled_Date.Locked = False