How to Password Protect a Form or Report in Microsoft Access

How to Password Protect a Form or Report in Access

by Shane Zentz
Microsoft makes doing a lot of things with databases very easy. And password protecting a form or report is no exception. With just a few lines of code in the right place you can prevent unwanted users from opening and viewing or editing data in your form or report. Just as an aside, this is not the most secure method and in fact is not really secure at all. But in order for someone to find the password (which is hard-coded into the application) they would have to have at least basic knowledge of access from the design and programming point of view, so if they are just users then chances are that they will never discover the password (by looking at the code behind the program) unless someone tells it to them or they discover it written down somewhere. Having said that, this method is still pretty useful for just average applications, like I said it is not really the most secure method, so if your application contains really sensitive data (like social security numbers or bank account numbers) then I would advise using another more secure method. But if you just need a basic password protection to protect just one or a few forms from average users then this method will work and it is also quick and very easy. So read on to see how this is done.

Open the form or report that you want to password protect in design view and find ‘form’ in the properties field (see photo 1). Then switch to the events tab. Under the events tab you will see a field called ‘on load’ (see photo 1), this is the field that controls what the form or report does when it is first loaded or opened. Here we want to add some code to the on load event so that it will first prompt the user for a password. So click on the tiny icon with the three little dots on it and on the window that pops up, select ‘code builder’. This will bring up a Visual Basic window (see photo 2) which will have a method for the ‘onload’ event preloaded. All we need to do is to add the code to this section.

 

Here is the code:
Dim PassWord As String

PassWord = InputBox(“Enter Password”)

If PassWord = “whatever password you choose here” Then’

Open FormDoCmd.OpenForm “name of the form that you want to password protect”
ElseMsgBox (“Wrong Password?”)

DoCmd.Close acForm, Me.NameEnd If

Save the code and exit and also save the changes to the form. Now try to open the form and you will get a password box before the form will open. If you enter the correct password then it will open, otherwise it will not. Another thing I should mention is that the text for the password is not dotted out or starred out like is usually is with password protection forms. I think that this can be changed but that is beyond the scope of this tutorial.
This code is pretty basic. To use this you will need to change the line that says “whatever password you choose here” to whatever you want the password to be. And then change the “name of the form that you want to password protect” to the name of your form. Now, you can change “Enter Password” to whatever message you want to appear when the password box comes up, and likewise, you can change the “Wrong Password?” part to whatever message that you want to display when the user enters the wrong password or does not enter any password at all.
So there you have it, a pretty easy and basic password protection system to password protect a form or report in Microsoft access. This will work with just about any version of Access, so give it a try. Just remember that this is not really completely secure becuase anyone who knows how can just look at the form in design view and then check the ‘onload’ event code to discover the hard-coded password, but the average user will never know how to do this anyway, so this is a reasonably decent solution.
Thanks for reading this tutorial on password protecting a form or report in a microsoft access database.

959 thoughts on “How to Password Protect a Form or Report in Microsoft Access”

  1. hi!,I really like your writing so a lot! percentage we keep up a correspondence extra about your article on AOL? I need an expert on this house to resolve my problem. Maybe that’s you! Having a look forward to see you.

  2. pay-day-loans-first.net You can appropriate the bread as a consequence moment payday loans in the range of ?100 to ?1500 in keeping with your monthly salary. The advance amount can be repaid at the outdated of your cash advance direct lender owning of a valid checking account where the amount released can be deposited. instant loans not forth your assign scores but it is interconnected to your exclusive report that is necessary to approve credit request. From here, you take easy rolling in it resource in contract of
    http://instantpayday1k.net#4990 direct lender for payday loans

  3. payday loans no credit check #bh1958~ payday loans lenders pay day loans no credit check upon those with the lowest rates. This unostentatious procedure could save you a package of money. here your next paycheck comes within a week of irresistible incorrect the loan. If this is the case, you liking indubitably comprise to get back at it assist with the paycheck that comes after that one.
    http://firstukpayday.co.uk#blog.shanezentz.com payday loans same day deposit

  4. bad credit loans no guarantor &ko9255# payday loan red deer unsecured loans for bad credit procedure. However, you do not balls such situations here. As a culminate, people can foresee the sanction and money quickly. This is the one intelligence why this pecuniary opportunity payday loans direct lenders avail loans in a short duration of time. With these loans, you can indubitably go through most of your needs. You can be afflicted with prepared notes when you need it the most. If you are a borrower
    http://badcreditneedloans.co.uk#blog.shanezentz.com #mj8999^ payday one scam

  5. payday loans for bad credit lenders only to avail loans whenever they meet financial worries. Amongst the comprehensive availability of loans, these are also approvingly commendable since it offers quick funds to borrowers.
    http://paydayloansforbc.co.uk#1765 collateral against it so anyone can avail it. The industriousness is processed as near as it can be. Most of the people are having the bogey of bad trust, they are exact but

  6. I’m really loving the theme/design of your website. Do you ever run into any browser compatibility issues? A few of my blog audience have complained about my blog not operating correctly in Explorer but looks great in Safari. Do you have any tips to help fix this issue?

  7. It really is best time to make some strategies towards the foreseeable future and it really is time to generally be pleased. I have read this article and if I could I wish to suggest you some helpful items or suggestions. Perhaps you could create next articles referring to this posting. I desire to learn additional points about it!

  8. payday loans for bad credit lenders provider, lenders may get disparate points of examine on certain others. The essentials where bordering on every lender has a common notion is that the borrower must be employed and be once again 18 years of age. The borrower must sooner a be wearing his salary quickly
    Here’s more in regards to Payday Loan look at paydayloansforbc.co.uk

  9. through inhibiting the PDE5 enzyme, these two drugs may also inhibit other PDE enzymes, such as Sildenafil can inhibit the PDE6 enzyme which is located in the look at, more than Tadalafil. http://cialisonlinez.net charming a pharmaceutical like the Cialis 20mg, which patently an individual of the largest tablets at at present. Cialis cheap cialis no prescription tadalafil best price tadalafil generic vs cialis http://tadalafilfirst.net mixing cialis generic viagra [url=http://tadalafilfirst.net]tadalafiltadalafil 20mg[/url] generic cialis ship to canada

  10. Pretty nice post. I just stumbled upon your blog and wished to say that
    I’ve truly enjoyed browsing your blog posts. In any case I will be subscribing to your feed and I hope you write again soon!

  11. [url=http://cialisonlinez.net]order cialis online without medical[/url] &lm5179& sale cialis pharmacy an voluminous pigheaded change in any man’s constantly life confirmed that having the faculty to perform sexually is not one a compulsory necessity representing a satisfying living, but additionally very mighty quest of any visionary relationship! The grey Druids [url=http://tadalafilfirst.net]best price on tadalafil[/url] eventually have a important maul on result on a relationship. buy cialis online buy genuine cialis http://buycialis24ph.net buy cialis generic [url=http://buycialis24ph.net]www.buycialis24ph.net[/url] buying generic cialis

  12. doctor’s prescription. Also, Cialis can easy as pie be bought online. Many people pick to buy Cialis online as several sites furnish them the help of unoccupied online medical consultation. All you essential to do is gorge up an online medical consultation http://buycialis24ph.net Spunk problems, high blood pressure, atherosclerosis, multiple sclerosis, and atherosclerosis are some of the other medical conditions that can disorganize the bubble of blood to the penis, leading to erectile dysfunction. Also, it has been create that Consider that Cialis cheapest cost pills may be acquired on the reticulum or from offline chum and mortar pharmacies. Cialis is usually a proven, first treatment method in spite of ED and it is easy on the eyes cost-effective when acquired on line. [url=http://tadalafilfirst.net]tadalafil reviews[/url] Tadalafil and considered as rhyme of the most operative, safe and affordable cure as it lasts up to 36 hours in the body. [url=http://cialisonlinez.net]buy cialis online in united states[/url] ~fc4818$ cheap cialis online

  13. I like the valuable information you provide in your articles.

    I’ll bookmark your weblog and check again here regularly. I am quite sure I’ll learn many
    new stuff right here! Best of luck for the next!

  14. loansforbc !qn9937* mogo payday loans bad credit loans no fees Payday loans be experiencing another types so that people could work them in a conduct according to their purposes. If your requirements are not big and you can dispose them along paydayloansforbc.co.uk like this the concurrence of these loans becomes damned quick. In besides, least formalities and truancy of paperwork decamp the processing of these loans absolutely fast. Non-standard thusly,
    http://loansforbc.co.uk#blog.shanezentz.com %lc726* payday today cash now

  15. online viagra %js2564% buy viagra in chennai viagra sales in india problems in spite of a prolonged while of once upon a time, which indicates that it is judicious to seek treatment. Men large incident erectile problems because of factors that are either physical or psychical in nature. What is the answer to the dilemma? Where viagra sales ^fa3660% buy viagra game safely cheap generic viagra commonplace enhance much better gradually. According to respective patients, they even had come to pause from polar clutches signs and symptoms.
    http://cheapviagra24ph.org#blog.shanezentz.com 50mg buy viagra

  16. Today, while I wаѕ at ωork, my siѕter
    stole mу аpple ipad and tested to ѕeе if it can surνive a foгtу foot drop, just sо she сan be a youtube
    ѕensаtion. My apple iρаd iѕ now broken and she has 83 views.

    I know this is totally off toρiс but ӏ had to shаrе it with
    someone!

    Alѕo visit my blog … top toronto web traffic

  17. http://tadalafilfirst.net Buyers who select to accept Cialis attired in b be committed to many options where to purchase the drug. An singular can attain Cialis from restricted drugstores or on the internet. When purchasing on the internet, customers be suffering with to be cautious on what firm they restricted to avoid difficulties including last due shipping, inexact shipment, and settle no deliveries at all. In above moreover they bear to prove to be determined that these are approved dealers of the medication or they could bound up obtaining a counterfeit variant. come to pass and medical awareness have to be sought. http://cialisonlinez.net Cialis acts in the in any case approach as Viagra, by blocking an enzyme called phosphodiesterase-5, or PDE-5. This helps the smooth muscles in the penis slacken and distend, which allows for more blood to enter. As a consequence, you come to erections faster and easier buy cialis no prescription buy soft cialis http://buycialis24ph.net buy cialis online [url=http://buycialis24ph.net]compare prices cialis[/url] order cialis

  18. I create a comment each time І appreсiate a post οn а sitе or I
    havе something to contribute to the diѕcuѕsion.
    Usuallу іt is a result of the fіre communicated іn the articlе I browsed.
    And aftеr this post How to Password Protect a Form or Report in Microsоft Access | Shane Ζentz’s Blog. I was moved enough to write a thought 😉 I actually do have some questions for you if you don’t mind.

    Is іt only me оr does it give the impreѕsion like a few of thеse гesponses look lіke thеy are left by brain dead peoρle?

    😛 And, if you are ωritіng on additional ѕites, I’d like to keep up with everything fresh you have to post. Would you list all of all your community pages like your twitter feed, Facebook page or linkedin profile?

    My site – baby attention

  19. http://ukpaydayukloans.co.uk poop before a payday allowance practice is made. US citizenship is a obligated to, a role that pays at least $1,000 monthly, a hire that has been kept in place of at least 3 months up to the non-standard presently, at least 18 years of time or more, a checking account opened against

  20. the working people in the every now of imperativeness without credit checks. You are instantly approved and bring back the amount within 24 hours and they can give back on next payday. [url=http://ukpaydayukloans.co.uk]payday loans uk direct lenders[/url] time. You can conclusively abhor the accommodation amount to unclouded medical bills, pay off your outstanding bills, training fees of your child, win a ability and so forth. There is

  21. I’ll immediately take hold of your rss feed as I can not find your email subscription link or e-newsletter service. Do you’ve any? Please let me understand so that I could subscribe. Thanks.

  22. I know this if off issue but I am shopping into starting my very own web site and was wondering what all is needed to receive setup? I’m assuming having a site like yours would expense a quite penny? I am not pretty net savvy so I’m not 100% certain. Any tips or assistance can be greatly appreciated. Kudos

  23. Just wondering, right before I consider subscribing… is this an actual, individually composed letter to every single subscriber, or does each individual writer compose a single letter just about every month and mail the exact same composition to all with the subscribers they’re assigned to write to?

  24. 50% discount of the flat stipend if you are a first-time borrower. In another manner, less costly fees are available universally, but your timing is what is signal as plainly as fees http://ukpaydayukloans.co.uk postponing blow, it’s in reality making it worse.

  25. It’s actually a great and useful piece of information. I’m glad that
    you just shared this useful information with us.
    Please keep us up to date like this. Thanks
    for sharing.

  26. http://firstbadcreditloans.net When do you demand this money? This outstanding in doubt wishes draw up a diversity in the fees you are charged. The faster you require your coins will instruct a higher compensation per

  27. hey there and thank you in your info – We’ve surely picked up some thing new from right here. I did on the other hand expertise a couple of technical points utilizing this web internet site, as I skilled to reload the world-wide-web web page a lot of occasions earlier to I could get it to load adequately. I obtained been questioning but if your hosting is OKAY? Not that I’m complaining, but slow loading situations occasions will often influence your placement in search engines and can harm your high quality score if marketing and advertising with Adwords. Anyway I am adding this RSS to my e-mail and can glance out for very much additional of one’s respective intriguing content. Be sure that you replace this yet again soon..

  28. Good day! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me.
    Anyways, I’m definitely delighted I found it and I’ll be book-marking and
    checking back frequently!

  29. Nіcе weblog right here! Also уοur ωebsite rather a lot uρ νery
    fast! What wеb host are you the usаgе of?
    Cаn I am getting уour aѕsoсiаte link to your
    host? I wіsh my web sitе loaԁed uρ as
    quickly аs yours lol

    Hеrе іs my wеbpаgе .

    .. Alma

  30. The martial arts are intended to teach self-defense, self-control, and self-confidence.
    To take matters into her own hands and figure how to get herself that ring.
    If you need proof, just look at the latest looks on red carpets and runways.

  31. buujfy http://www.cheaper-montblancpens.com smeey [url=http://www.montblancpensincheap.com]Mont Blanc Pens[/url] ynejak http://www.montblancpensincheap.com awklz [url=http://www.montblanconlines.com]Mont Blanc[/url] thzlhf http://www.montblanconlines.com zkzn [url=http://www.cheapmontblancpens.co.uk]Mont Blanc Pen[/url] cmqfwj http://www.cheapmontblancpens.co.uk ywhjm [url=http://www.salemontblancpens.co.uk]Mont Blanc[/url] kedkkp http://www.salemontblancpens.co.uk tpzks [url=http://www.montblanconlines.co.uk]Mont Blanc Pen nwlmgh http://www.montblanconlines.co.uk edzi

  32. Wow! this cartoon type YouTube video I have viewed when I was in primary level and at the moment I am in school and seeing that once more here.

  33. Useful information. Fortunate me I discovered your web site by accident, and I’m stunned why this coincidence did not took place earlier! I bookmarked it.

Comments are closed.