How to filter a unbound listbox from an unbound field?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ryno Bower
    New Member
    • Nov 2010
    • 76

    How to filter a unbound listbox from an unbound field?

    Hello,
    I have a form called "TimesEntry " with buttons and a unbound list box calles lstTimes.

    This form is to enter times worked from and to and lunch hours etc. So when I enter these times, I would like it to be shown in the list box "lstTimes".
    But, however, it must be filtered by employee. So when the form is open it must only show the records in the list box for the current employee, which is on the main form as Forms!Main!txtU ser.

    Would it be possible?

    Some extra info.* When I open the databse, a login form appears. The employees will put in their username and password. When they log in another form opens called "Main". On this form there is an unbound field "txtUser". All the other forms are filtered by what is in the txtUser field. Hope this explains something.

    Please help - I'm desperate!

    Thank you in advance
    Ryno
    Last edited by Niheel; Jan 14 '11, 07:33 AM. Reason: what's up with all the *'s ???
  • TheSmileyCoder
    Recognized Expert Moderator Top Contributor
    • Dec 2009
    • 2322

    #2
    You should be able to setup the listbox recordsource to include the txtUser as a query parameter. You may need to include some code to update the listbox when a user enters new data, and when you move from record to record.

    Comment

    Working...