Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

2.26 Password Login Form / screen using VBA in Access

Loading...

Sign in or sign up now!
99,235
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jul 22, 2008

Creating a Login Form and password protecting your database

Here's the code I used:

Username.SetFocus
If Username = "user1" And Password = "user1" Then
MsgBox "Access Granted", vbInformation, "CD Shop"
MsgBox "Welcome", vbInformation, "CD Shop"
DoCmd.Close
DoCmd.OpenForm "F_Switchboard"
Else
MsgBox "Please re-enter your Username and Password."
End If

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (Firchild)

  • Ive done exactly wat is said but when i press the button nothing happens... plz help asap

  • @ConswaylahBear Read the feedback to the previous, identical comment..

  • i did it as told but nothing happened when i press on the button.

    please help

  • @hlmasoud Check your code is referencing the text boxes username and password (and that you've named the text boxes from text1, text2 etc - and not changed the label instead)

  • @hlmasoud

    found the error. i had the security warning disabled.

    1000 thanks for this vedio.

    cheers

  • @hlmasoud No worries, that security warning is a pain! It does stop nasties though..

see all

All Comments (73)

Sign In or Sign Up now to post a comment!
  • OMG thanks needed it for my computing coursework

  • I'm sorry - I finally figured it out..

    THANKS!!!

  • YOU ARE AWESOME!!!!!, SAVED MY LIFE!!!!! (I had to do assignment)

  • It works well i follow using 2007! Gr8 man!

  • @Peeboontheng two words 4 me.....thumbs up! :)

  • 1 word 'COOL'

View all Comments »
Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more