Results 1 to 5 of 5
  1. #1
    RoyLittle0 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2012
    Posts
    25

    Cant get my Login form to display items in a list box

    Hi,



    I have been following a Tutorial from mrexcel forum but I cant seem to get it to work, I am obviously doing soothing wrong but for the life of me i cant see what it is

    http://www.mrexcel.com/forum/microso...ns-system.html

    I have two text boxes txtUser and txtLevel (these would normally be hidden) and they are getting the correct information from my login

    These then look at the MenuItems and if the txtLevel is greater than or equal to the value in the table it will display that line and therefore give access to the form (no forms added at the moment)

    any help would be appreciated

    Service Asistance Logging.zip

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Change the listbox RowSource by removing the reference to form prefixing the textbox name:

    SELECT MenuItems.Item, MenuItems.Form, MenuItems.ObjectType FROM MenuItems WHERE (((MenuItems.Level)<=txtLevel)) ORDER BY MenuItems.SortOrder;
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    RoyLittle0 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2012
    Posts
    25
    Ok, if I load the form then all items show in the listview which is incorrect

    but if I change from FormView to DesignView and then back to FormView again, it works, so it must be something to do with the form load, or the data in the listview is loading before the form load routine has finished?

    But the query itself seems to work.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Add this line at end of the form Load event:

    Me.lstMenu.Requery
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    RoyLittle0 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2012
    Posts
    25
    Perfect, Thank you

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

Similar Threads

  1. Replies: 3
    Last Post: 05-31-2012, 02:49 PM
  2. Write "Edit List Items.." data back to original form.
    By ngahm in forum Database Design
    Replies: 33
    Last Post: 02-27-2012, 06:54 PM
  3. How display all 3 items on report without..
    By mr1sparkle in forum Access
    Replies: 1
    Last Post: 04-04-2011, 12:08 AM
  4. Replies: 9
    Last Post: 01-20-2011, 02:22 PM
  5. Replies: 13
    Last Post: 06-01-2010, 09:55 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