Results 1 to 4 of 4
  1. #1
    sharVyn is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    6

    Coding Login Menu

    I am new to VBA. I want make a login menu for a course work. I am having some difficulty.
    - I have a frmLoginMenu and tblLoginMenu
    -In tblLoginMenu I have a record named "firstrun". its values must be 0 or 1
    My objective: I want the system to check if the value is 0 or 1.
    But i don't really understand how to pull up (check) the value from record "firstrun" from tblLoginMenu


    Now I am coding frmLoginMenu. I want to know what code to use for the system to check if the value is 1 or 0.
    If anyone can explain this much to me, i think i'll be able to continue the remaining parts.

    But, please use simple codes as I am already confused

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    One way would be a DLookup! If you just wanted to look it up. If you wanted to manipulate the value after looking it up, a recordset.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    sharVyn is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2012
    Posts
    6
    uhhhm, i wanted to use the command "[tblLoginMenu]![Username]", but i do not know how to use it properly. I want to pull the value from the record "firstrun".
    if i am not mistaken, Dlookup is available only when designing the interface and adding different buttons. it is not available when using VBA

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    You are mistaken, DLookup is available pretty much anywhere. You can't refer to the table that way. Your two basic options in VBA are DLookup and a recordset.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Please help with VB coding
    By winterh in forum Import/Export Data
    Replies: 11
    Last Post: 03-19-2012, 06:05 PM
  2. Need help in VBA coding
    By Kcgp in forum Programming
    Replies: 6
    Last Post: 02-01-2012, 11:22 PM
  3. Coding newbie
    By Phoenyxsgirl in forum Programming
    Replies: 2
    Last Post: 10-13-2011, 08:37 AM
  4. Login form with nt login
    By hitesh_asrani_j in forum Forms
    Replies: 6
    Last Post: 09-22-2011, 11:43 AM
  5. Bar-Coding
    By texasprincess7 in forum Access
    Replies: 1
    Last Post: 02-12-2009, 10:29 AM

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