Yet another filter Subform by Combo Box

I

idtjes3

Hello All,

First, sorry for posting a question like this again. I know its been
answered before, but even after trying a few methods on this site, I'm still
unable to get mine to work. I have a main form called Employee Information.
On This form is a tab control with 2 tabs: "contact information tab" is a
bunch of boxes that display data from a Employee Data table and "project/hrs
tab" displays information form a form "SubForm - Employee Time Cards", which
lists all projects and the time that employee worked on it (in a data sheet
format).
Now on the Main form I already have one combo box that uses a query to
populate the box with all the employees names. As I select and employee from
the combo box their respected data is listed on the contact information tab
and the project/hrs tab filters the SubForm - Employee Time Cards to only
display results from the selected employee.
I created another combo box called ProjectSelect that uses all our
ProjectID numbers as a source. I want to be able to filter the project/hrs
data on the subform of a selected employee by what ever project i choose from
the combo box. Basically what I have to do now is go through all the records
and physically count the hours from a specific project. I kinda have an Idea
of what i have to do, but I'm still having a hard time understanding Accesses
syntax. Heres the code I have to control the first combo box which lets me
choose an employee:

Private Sub cmbEmployeeID_AfterUpdate()
DoCmd.ShowAllRecords
Me!EmployeeID.SetFocus
DoCmd.FindRecord Me!cmbEmployeeID
Me.ProjectSelect.Value = Null
End Sub

I have the ProjectSelect to set its value to Null after I choose a new
employee because I eventually don't want the filter to still be active if I
switch to another employee. Sorry for the long post, I just want to make sure
I give enough details. If your still with me, Thanks!
 
I

idtjes3

Hello Again,

Please disregard this post as Ive decided to take a more simple route to
achieve my desired affect.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top