Need to hide password in Replicated database

Windsurfer

New member
Local time
Today, 16:41
Joined
Mar 3, 2001
Messages
7
Hi, I posted something related to this earlier, but I think this will be a better explanation:
-----------------------------------------
Private Sub Form_Activate()
On Error GoTo Err_Form_Activate
Dim lbOK As Boolean
Do
While gsPassword = ""
gsPassword = InputBox("Enter Password:", "OLYMPIA Windows")

Wend
lbOK = fnGoGetUser()
If Not lbOK Then
MsgBox "Wrong Password, try again."
gsPassword = ""
End If
Loop While Not lbOK
Me![Orders by Customer Subform].Requery

Exit_Form_Activate:
Exit Sub

Err_Form_Activate:
MsgBox Err.Description
Resume Exit_Form_Activate
End Sub
--------------------------------------
This works in my replicated database except I can't mask the password, instead of "***" I get "lrd" and is not very secure.
I created a form called "EnterPassword" with an unbound field, made it Modal and replaced the inputbox line with:
-----------------------------------------
DoCmd.OpenForm "EnterPassword"
If gsPassword <> "" Then
End If
-------------------------------------------
When I start the database the form "EnterPassword" opens but I can't enter anything and the program stop responding with the hourglass busy and the hard drive humming.
Is obvious I don't know what I am doing, can someone please help.
Thanks, Emilio
 
If you make the database an MDE file, then the user will not be able to see any code. This means that you can have a modal form upon opening the databse, with a textbox inputmask = password. User inputs password then on th form you have a command button where the code is somithing like.


If Me.Txtbox = "Password" then
{Open your main form and close the modal form}
else
MsgBox "Please try again"
end if

The users can't see this code and as it is a modal box they can't by pass it. Just remember 1) to make a backup of the original db as you can't convert an MDE back to a normal file and 2) to disable the shift key for on open, otherwise when the user opens the file, if they have the shift key pressed down, then it cancels the auto-open functions and your modal form will not be opened.

Hope that gives you some ideas
 
Thanks for your help, I neglected to say my database is replicated with 4 users.
Thanks anyway,
Emilio
 

Users who are viewing this thread

Back
Top Bottom