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.
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
SAMSUNG 34" Odyssey G85SD Series QD-OLED Ultra WQHD Curved Gaming Monitor, 175Hz, 0.03ms, DisplayHDR True Black 400, AMD FreeSync Premium Pro, Advanced Game Streaming, LS34DG856SNXZA, 2024
33% OffSAMSUNG 34" Odyssey G85SD Series QD-OLED Ultra WQHD Curved Gaming Monitor, 175Hz, 0.03ms, DisplayHDR True Black 400, AMD FreeSync Premium Pro, Advanced Game Streaming, LS34DG856SNXZA, 2024
33% OffArtciety Foldable Bluetooth Keyboard, Wireless Portable Keyboard with Larger Touchpad, Pocket-Sized Folding Travel Keyboard for MacOS Android Windows iOS, Sync Up to 3 Devices (BT5.1 x 3)
$40.99 (as of December 21, 2024 02:47 GMT -05:00 - More infoProduct prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on [relevant Amazon Site(s), as applicable] at the time of purchase will apply to the purchase of this product.)Introducing the NETGEAR Nighthawk M6 5G WiFi 6 Mobile Hotspot Router (MR6150), the ultimate 5G mobile internet experience.
With its powerful Qualcomm Snapdragon X55 modem and advanced Wi-Fi 6 technology, you can now enjoy fast speeds, reliable connections, and increased coverage for your mobile hotspot needs.
The Nighthawk M6 is compatible with both 4G and 5G networks, so you can take advantage of the fastest speeds available on the market.
It also features a built-in battery that provides up to 10 hours of continuous use, so you can stay connected while on the go.
Additionally, it has an intuitive touchscreen