Create Login Form Access

๐Ÿ‘‰ Check out my grocery database, https://grocerydynamite.com/

We need a table that relates users to the level of access they have in the database. The 3 columns needed are Username, Password, and Security Level.

Lifetime deal ยท Unlimited Plan

๐Ÿš€๐Ÿš€๐Ÿš€๐Ÿš€๐Ÿš€ The toolstack behind the scenes of 10,000+ Successful Content Creators
Create, transform, and publish content across all platforms with one click. Save 20+ hours per week and never struggle with content creation again.

Confidently trusted by 10,000+ Creators. Claim Your Special Deal Right Now!
Confidently trusted by 10,000+ Creators. Claim Your Special Deal Right Now!

You get access to the full content engine โ€” for less than the cost of 1 month on any other tool. Confidently trusted by 10,000+ Creators. Claim Your Special Deal Right Now! Click Here Now!

We need a form that lets us enter our password and check the database for validity and deny entry to invalid credentials. A VBA Macro is also needed to make this work.

The forms we need are
Admin
Login
Welcome

-Code-

Dim Userlevel As Integer

If IsNull(Me.username) Then
MsgBox “Please enter the correct username.”, vbInformation, “Username required”
Me.username.SetFocus

ElseIf IsNull(Me.password) Then
MsgBox “Please enter the correct Password.”, vbInformation, “Password required”
Me.password.SetFocus

Else
    If (IsNull(DLookup("username", "UserAccount", "Username='" & Me.username.Value & "'"))) Or _
    IsNull(DLookup("Password", "UserAccount", "Password='" & Me.password.Value & "'")) Then
    MsgBox "Username or Password is Incorrect!", vbCritical, "Login Denied"
    Me.username = ""
    Me.password = ""
    Me.username.SetFocus

Else
Userlevel = DLookup("[Security Level]", "UserAccount", "Username='" & Me.username.Value & "'")


        If Userlevel = 1 Then
        MsgBox "Access Granted... you may proceed!", vbInformation, "Authentication Succeeded"
        DoCmd.RunCommand acCmdSaveRecord
        DoCmd.Close
        DoCmd.OpenForm "Welcome"

End If

        If Userlevel = 2 Then
        MsgBox "Access Granted... you may proceed!", vbInformation, "Authentication Succeeded"
        DoCmd.RunCommand acCmdSaveRecord
        DoCmd.Close
        DoCmd.OpenForm "Admin"

End If
End If
End If

End Sub

Please follow and like us:
Surfshark VPN - Secure Your Data Today!
Surfshark VPN - Secure Your Data Today!

Did you know that websites can potentially identify visitors through IP addresses, cookies, and browser fingerprinting? Did you know that your ISP can see all the activities you do online as they track all your activities?

The fact is websites and apps use different technologies to collect information about what you do online. What can you do about this? Protect your privacy with a VPN, not just any VPN, Surfshark VPN. Surfshark VPN is a high-security, user-friendly virtual private network service known for allowing unlimited simultaneous device connections. It encrypts internet traffic to protect user privacy, bypassing geo-restrictions for streaming, and offers advanced features like MultiHop, ad-blocking, and a strict no-logs policy, making it a top-tier, affordable security tool.

Surfshark VPN - Secure Your Data Today!

Proudly supported by Eternal Records 96.
Proudly supported by Eternal Records 96.

Leave a Reply

Music by Psychotik Orbit

Psychotik Orbit Co - Original Instrumentals
Psychotik Orbit Co - Original Instrumentals

Music by Psychotik Orbit - Rock / Metal / Groove / Industrial

Techno / Bass / Experimental

DJ-3T Official Site - House / Electro House / Breaks / Electro Breaks / Breakbeat / Tech House / Deep House / Soulful House / DJ Mixes / History / DJ Mix Videos / Bass House / Future House / Bass DJ Mixes

DJ-3T EDM
DJ-3T EDM

DJ-3T Official Site - House / Electro House / Breaks / Electro Breaks / Breakbeat / Tech House / Deep House / Soulful House / DJ Mixes / History / DJ Mix Videos / Bass House / Future House / Bass DJ Mixes

Quality DJ MIXES FOR ELECTRONIC MUSIC

YouTube
YouTube
Pinterest
Pinterest
fb-share-icon
LinkedIn
LinkedIn
Share
Instagram
Telegram
WhatsApp
Snapchat
Tiktok
Mastodon
URL has been copied successfully!
THREADS