Password on a form, switchboard

  • Thread starter weazer via AccessMonster.com
  • Start date
W

weazer via AccessMonster.com

I saw an example of an event procedure that asked for a password in order to
open up a form.

I tried it and it worked but you saw the password when you type it in - there
was no password mask on it.

Is ther any way to have an input mask on it (********) so no one can see what
you are typing in?

Can a switchboard be set up so you need to enter a passwword before it opens
up?

Thanks for your help as I am new to Access. I am using Access 1997.
 
W

weazer via AccessMonster.com

I am still confused - I am entering the password via an inputbox. Where would
I set the input mask property to the word:password.

Thank you for your reply and help.
Create an InputMask on the textbox used to enter the password. Set the input
mask property to the word: Password

That's it!
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
I saw an example of an event procedure that asked for a password in order to
open up a form.
[quoted text clipped - 12 lines]
 
D

Douglas J. Steele

You can't use an inputbox.

You must use a form.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


weazer via AccessMonster.com said:
I am still confused - I am entering the password via an inputbox. Where
would
I set the input mask property to the word:password.

Thank you for your reply and help.
Create an InputMask on the textbox used to enter the password. Set the
input
mask property to the word: Password

That's it!
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
I saw an example of an event procedure that asked for a password in
order to
open up a form.
[quoted text clipped - 12 lines]
 
F

fredg

I am still confused - I am entering the password via an inputbox. Where would
I set the input mask property to the word:password.

Thank you for your reply and help.
Create an InputMask on the textbox used to enter the password. Set the input
mask property to the word: Password

That's it!
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
I saw an example of an event procedure that asked for a password in order to
open up a form.
[quoted text clipped - 12 lines]

The built-in Access Input Box does not support an Input Mask.

You MUST use a control on a form.
Create a new form.
Add a text control.
Add an Input Mask .. Password .. to this control.
Name this control "txtPassword".
Add a command Button to the form.
Code the Command Button Click event:
Me.Visible = False

Name this form "frmPassword"

Then, whenever you need access to a password protected object, open
this form, using:

DoCmd.OpenForm "frmPassword", , , , , acDialog
If forms!frmPassword!txtPassword = "This is the password" Then
' Do whatever you want here
Else
' Do something else here
End If
DoCmd.Close acForm, "frmPassword"
 
W

weazer via AccessMonster.com

I am sorry for not fully understanding - just started to use Access.

What do you mean by adding a text control to the new form?

Would I always open this form first and if the password is correct then open
my input form, report etc?

Where am I entering my password?

Thanks for your help.
I am still confused - I am entering the password via an inputbox. Where would
I set the input mask property to the word:password.
[quoted text clipped - 19 lines]
The built-in Access Input Box does not support an Input Mask.

You MUST use a control on a form.
Create a new form.
Add a text control.
Add an Input Mask .. Password .. to this control.
Name this control "txtPassword".
Add a command Button to the form.
Code the Command Button Click event:
Me.Visible = False

Name this form "frmPassword"

Then, whenever you need access to a password protected object, open
this form, using:

DoCmd.OpenForm "frmPassword", , , , , acDialog
If forms!frmPassword!txtPassword = "This is the password" Then
' Do whatever you want here
Else
' Do something else here
End If
DoCmd.Close acForm, "frmPassword"
 
A

Arvin Meyer [MVP]

The Access Inputbox does not support using input masks. You need to build
your own form, which can be a very simple unbound form with a single
textbox. In the form's design view, open the property sheet (from the
toolbar or view menu) and select the Data tab. In the Input mask property,
type the word; Password. Add a button which check the value in the textbox
(just like the inputbox code) and if it matches, opens your form. Fred's
instructions were accurate for building the form, some sample code, using
Fred's structure might look something like:

Instead of the InputBox code which looks something like:

If Inputbox("Enter the password") = "ThePassword" Then
DCmd.OpenForm "frmWhatever"

Try:

DoCmd.OpenForm "frmPassword", , , , , acDialog
If forms!frmPassword!txtPassword = "ThePassword" Then
DoCmd.OpenForm "frmWhatever"
Else
MsgBox "You don't have the right password .. Bye bye"
DoCmd.Quit
End If

DoCmd.Close acForm, "frmPassword"
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access


weazer via AccessMonster.com said:
I am sorry for not fully understanding - just started to use Access.

What do you mean by adding a text control to the new form?

Would I always open this form first and if the password is correct then open
my input form, report etc?

Where am I entering my password?

Thanks for your help.
I am still confused - I am entering the password via an inputbox. Where would
I set the input mask property to the word:password.
[quoted text clipped - 19 lines]
/1

The built-in Access Input Box does not support an Input Mask.

You MUST use a control on a form.
Create a new form.
Add a text control.
Add an Input Mask .. Password .. to this control.
Name this control "txtPassword".
Add a command Button to the form.
Code the Command Button Click event:
Me.Visible = False

Name this form "frmPassword"

Then, whenever you need access to a password protected object, open
this form, using:

DoCmd.OpenForm "frmPassword", , , , , acDialog
If forms!frmPassword!txtPassword = "This is the password" Then
' Do whatever you want here
Else
' Do something else here
End If
DoCmd.Close acForm, "frmPassword"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top