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
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
"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!
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks