+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Forum Contributor
    Join Date
    03-12-2004
    Posts
    147

    I can't seem to use filters properly - looking for tips

    I am getting frustrated trying to figure out how to add filters to a form I am building. This is somewhat related to my other topic "help with nested combo box" but at a more basic level I can't even a single combo filter to work.

    I have been able to add the filter button but it seems to be useless.

    I need to know 2 things:

    1) How to add a filter to a form that is a combo box and can include all results or the specific choice you make from the combo box.

    2) How to have a filter linked to a filter.

    Detail of my problem below:

    I have two tables:

    -tbl_Employee - List of all employees. Fields include Department, Employee ID, Employee Name. Employee ID is the Primary Key.

    -tbl_DEPT - List of departments. Only one column, Dept ID which is the primary key

    -tbl_TimeClock - Table to store hours worked for each employee. Fields include: Date, Employee ID, Work Hours. Combination of Date and Employee ID is the Primary Key. In the relationship manager I have linked Employee ID in TimeClock and Employee tables.

    The form I am building is to add records to the TimeClock table.

    I would like to add a filter to the top of the Form that will be a combo box. The combo box will list all the possible departments. This list of departments is pulled from the field "Dept ID" from tbl_DEPT.

    Now on to the form input which has three fields: Date, User ID, and Work Hours.

    With this filter applied I want the combo box I have for the User ID to be restricted to only show User IDs that match the deptartment filtered. The table Employee provides the link between USER ID and DEPT ID.

    Can't figure out how to do this!

    Next challenge is what I referred to as a nested combo box. Basically after I figure out the filter described above I want to know how to have a second filter that is original filter. For simplicity sake assume I want the form to retain the "Dept" filter and now have a second filter "Employee". The list of employees in the filter would show only employees tied to the Dept ID selected in the 1st filter.

    Make sense?

    Please help.

    thanks

  2. #2
    Valued Forum Contributor
    Join Date
    04-23-2009
    Location
    IOWA
    MS-Off Ver
    2010 Professional
    Posts
    233

    Re: I can't seem to use filters properly - looking for tips

    I pulled a section of a database I wrote out for you to see how I did it. If there are errors in it, it is because I haven't finished the whole database and tested yet, however it should give you what you are looking for.

    Hope this helps,

    Dan
    Attached Files Attached Files
    "I am not a rocket scientist, I am a nuclear engineer." - Split_atom18
    If my advice has been helpful to you, then please help me by clicking on the scales and adding to my reputation, Thanks!

  3. #3
    Forum Contributor
    Join Date
    03-12-2004
    Posts
    147

    Re: I can't seem to use filters properly - looking for tips

    split_atom - thank you for sharing. Lots of good examples in there I will try to reverse engineer - a bit overwhelmed, only been using Access about 10 hours. Appreciate the help.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0