36 responses to “How to Protect Your Sensitive Data with a Login Form in Access”

  1. Hi Works perfectly, thanks. I’ve been looking for a way to protect my DB for a while and this was the easiest to do. I would like it to open another form when the login form closes. Can you tell me what code needs to go at the end of the login?

  2. It absolutely works. i have successfully protected my database…..
    I simply followed all the steps and created my own work (not use sample) and it works….
    despite i am not a ITechy….
    you can use sample too, but have you tweeked it to suit your database first ???

  3. . I cannot open the Access file. It took me 3 hours create tables and forms but now I lost the database. Please help or it is a trap

    Reply

  4. Again for someone whose loosen to do anything for the sample that you’re activated and failed for running, don’t worry just change or rename the sample login and reopen again do as the suggestion below.

  5. Suggestions for someone who download sample to test run on your computer.
    1.don’t hurry to activate content, made right click on frm_login and choose close to close this form and go to tbl_login open it and change data in records that you need and easy to remember it then turn back to activate content on the top you can use this login as well. Good luck to you all.

  6. you got to love people that dont read. he gives you the password in step 1.5 and if you download the sample database and just copy it into yours then it will work!!

  7. I’ve done everything listed but when I try to test this out, I keep getting Run-Time error ‘3061’ Too Few parameters. Expected 1. When I click on the debug option, it highlights: Set rst = db.OpenRecordset(strSQL) as the culprit. Problem is, I’m not sure what I’m supposed to do here as I am not good with coding at all. I see some recent comments saying that it worked for some, would anyone happen to know how to fix this?

  8. Hey i got a question

    The code works fine for me, everything is ok, but i want to add a feature and i don t know to code

    So i want that after the Login is successful i want it to auto open another form, how do i do this ?

  9. Josh- I have begun the build of a new database with your front end – however, certian functions are not usable, like in the OLD object, where you right click to add and item, it doesnt work for anyone but myself, and only on my machine – if we login to someone elses computer, and login with my access it then refuses to allow the Right click as well. Only through the machine I built it on can I actually do it.
    Do you have any information on why this is occuring I am sure its just a setting on the DB Options.

  10. Hello
    After using the code, it gives error and I can’t close the database neither do I work on it. What do I do

  11. This is to Joshua Wolski, Hi this is Mark and for a while I was working on my database. Got a lot done. I wanted to password secure it so I used the above code and instruction. I did secure it but to my shock there is not password popup to enter. Wow did I get pissed. I was about to purchase this software to recover my database until I scrolled down and read your first post. Hold down the shift key and then you can work on it. I did and I was able to delete that one form. Now I got it back and no more secure locked out. Thanks for posting that tip.

  12. Another way I have found is toprevent the code from executing on open, by holding shift when you open the access Database. As long as you havent disabled this feature. Also do not set your PW to blank for testing, as the code trims the text value and looks for vbnullstring, if vbnullstring the code says you have to enter a value.

  13. to close the form. Make sure the form has the same name in the code and as the form. When the code debugs, move the code line down to DoCmd.Close acForm, “tbl_login”, acSaveYes and debug through the code. It will close the form and give you access again

  14. If the form is not closing make sure your form name is the same as in the code. I just fixed that the closign issue myself noticing that the two name were differnt. in the code :

    Else
    MsgBox prompt:=”Hello, “, buttons:=vbOKOnly, title:=”Login Successful”
    DoCmd.Close acForm, “tbl_login”, acSaveYes
    End If

    make sure DoCmd.Close acForm, “tbl_login” <——–make sure it doesn't say "frm_login"

  15. Hi,
    The login form is not really work.
    After login successfully with greeting, the login form is not close. Nothing happen. I cannot open the Access file. It took me 3 hours create tables and forms but now I lost the database. Please help or it is a trap

Leave a Reply

Your email address will not be published. Required fields are marked *