Results 1 to 3 of 3
  1. #1
    wilson76 is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jul 2022
    Posts
    1

    need help with user name login

    hello guys i need help for username login info
    i have a table of usernames that include username for usernames userpass for password and usershow for users full name i want to show users full name in main menu after they login my login button code is
    Code:
    Private Sub cmdlog_Click()
    If IsNull(Form_frmlogin.txtuser) Then
        MsgBox "enter user", vbInformation, "adam vorood"
        Me.txtuser.SetFocus
        Me.txtuser.BackColor = vbYellow
        Exit Sub
    End If
    Me.txtuser.BackColor = vbWhite
    If IsNull(Form_frmlogin.txtpass) Then
        MsgBox "enter pass", vbInformation, "adam vorood"
        Me.txtpass.SetFocus
        Me.txtpass.BackColor = vbYellow
        Exit Sub
    End If
    Me.txtpass.BackColor = vbWhite
    
    If IsNull(DLookup("userName", "tbluser", "userName='" & Form_frmlogin.txtuser.Value & "' and userPass='" & Form_frmlogin.txtpass.Value & "' ")) Then
        MsgBox "nam ya ramz ghalate", vbInformation, "khata"
        Exit Sub
    End If
    
    DoCmd.OpenForm "frmmain"
    DoCmd.Close acForm, "frmlogin", acSaveYes
    End Sub
    what should i do to show the user full name that logged in in my main menu?

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

Please reply to this thread with any new information or opinions.

Similar Threads

  1. User login and only see his records
    By bigguy in forum Forms
    Replies: 3
    Last Post: 04-02-2015, 07:49 AM
  2. Block a user to login
    By rcoreejes in forum Access
    Replies: 3
    Last Post: 07-03-2013, 11:20 AM
  3. User Login Form
    By glen in forum Forms
    Replies: 21
    Last Post: 09-17-2012, 09:09 AM
  4. User Login
    By winterh in forum Forms
    Replies: 6
    Last Post: 03-14-2012, 06:01 PM
  5. Replies: 3
    Last Post: 09-22-2011, 03:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums