creating a password to access forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need help on creating code for a password, so that some users can edit
the data in the forms and if you do not have a password it will take you to
forms that are read only. How do I do this?
 
Hi, Ron.

Please see the following Web page for the KB article, "How to Create a
Password Protected Form or Report" on the following Web page:

http://support.microsoft.com/default.aspx?id=209871

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.
 
69 Camaro,
Thanks it did help. I dont understand this part of the article
*** Important note: ***

You will need to enter the full path to the secured database file and the
workgroup information (MDW) file in the appropriate places. Make sure to
exclude the <> marks when you enter the path. They are only there for
illustration.

If you examine the code carefully you will notice that we are building up a
very long text string that mimics what you would see in a desktop shortcut
link for a secured database. We use the SysCmd(acSysCmdAccessDir) function
to determine the path to the current msaccess.exe file.

thanks for your help
 
Hi, Ron.

I'm not sure where you copied the "Important note" below from. It doesn't
appear in the KB article I recommended. In any case, a secured workgroup is
not required to use the method described in the article, so you can ignore
the important note below -- unless you need it for something else you are
trying to build for your database.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.
 
69 Camaro
Sorry I went to the wrong sight, I did go to this site
(http://support.microsoft.com/default.aspx?id=209871) and most of it work
great,
I cant find where i went wrong, everytime I put in a password it says not a
valid password. The article says to put in 2818 in tbe tblPassword/ , then
in at the end it says to type in Password and it should let you into the
form. In the tblPassword / objectname in stead of puting in Orders I used
the form I am using which is Locksmiths only. Which is the form I want to use
the password on. Any Ideas on what I am doing wrong?
 
Hi, Ron.
Any Ideas on what I am doing wrong?

You followed instructions. That's what's wrong! The instructions say to
put 2818 in the tblPassword table. However, that's the "raw" password, and
it must be encrypted and then the encrypted value should be saved in the
table. To do so, open the Immediate Window and type:

?KeyCode("2818")

It will return -4368. This is the value that should be stored in the table,
not 2818. Sorry for the confusion.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.
 
Sorry I did not get back to you sooner, been busy on other things.
The one part that I dont understand is the where you said to (open the
immediate window.). what is the immediate window?
again thanks for your help.
 
Hi, Ron.

Press <CTRL><G> at the same time and the Immediate Window will open for you
in the VB Editor. (Or just open the VB Editor and select the View ->
Immediate Window menu.)

This window is a shell to the VB interpreter for debugging purposes. One
may type commands and VBA expressions in this window, as opposed to typing
regular VBA expressions in the VB Editor's code window to be executed
proceduraly at run time. However, when one types the command in the
Immediate Window and presses <ENTER>, the command is executed immediately.

The commands in the Immediate Window are "volatile," in that they won't be
saved past the current session. The VBA commands typed in the VB Editor
will be saved as source code in the database file unless one chooses not to
save them before closing Access.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.
 
Back
Top