Filter by Combo Boxes

Corey

Registered User.
Local time
Yesterday, 21:24
Joined
Sep 14, 2005
Messages
35
Hello everyone,

I’m trying to build a form that uses three dropdown combo boxes.

The first one would show you all of the Managers in the company.

The second drop down would show all of the supervisors that report directly to the Managers you picked in the first combo box.
And if you don’t choose any of the managers, it would show you all of the supervisors in the company.

The third dropdown combo box will show all of the employees that report directly to the supervisor that was picked from the second dropdown combo box, and if no supervisor was picked and no Manager was picked, you would see all the employees. But if you picked a manager and no supervises in the employee dropdown combo box you would see all the employees that report directly to all the supervises that report directly to that managers


I was also hoping I could view/print a report that shows this information.

I started working on it in VBA, but continue to get a lot of errors.
Below is the code I have put together so far.

If anyone can help at all, I would be very appreciate of

Thank you again for all your help

Code:
Private Sub cmdVeiwReport_Click()
If IsNull(Me.cboManagerDropdown) Then
DoCmd.OpenReport Me.cboReportDropDown, acViewPreview

Else

If IsNull(Me.cboManagerDropDown] Then
DoCmd.OpenReport Me.cboReportDropDown, acViewPreview, , "[Manager]='" & Me.cboManagerDropDown.Column(1) & "'"

Else

DoCmd.OpenReport Me.cboReportDropDown, acViewPreview, , "[ supervisor]='" & Me.cboMagaerDropDown(1) & "' And " & "[Manager5] = '" & Me.cbosupervisor Downdown & "'"

End If
End Sub
[code]
 
Do a search for cascading combo box...That will give you all the info you need.
 
Private Sub cmdVeiwReport_Click()
If IsNull(Me.cboManagerDropdown) Then
DoCmd.OpenReport Me.cboReportDropDown, acViewPreview

Else

If IsNull(Me.cboManagerDropDown] Then


Both statements are the same :confused:
 

Users who are viewing this thread

Back
Top Bottom