By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,919 Members | 1,625 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,919 IT Pros & Developers. It's quick & easy.

Filter through Drop down box

P: 74
Ok so i have a form that is in Continuous view displaying many "Call Logs" A drop down box is located in the header of the form. This box isalready set up to look at the Companys that are designated on the call logs below. I want to be able to select a company in the drop down list and have it filter out all the other companys in the list below. Please Help Thanks in Advance.
May 11 '07 #1
Share this Question
Share on Google+
5 Replies


ADezii
Expert 5K+
P: 8,628
Ok so i have a form that is in Continuous view displaying many "Call Logs" A drop down box is located in the header of the form. This box isalready set up to look at the Companys that are designated on the call logs below. I want to be able to select a company in the drop down list and have it filter out all the other companys in the list below. Please Help Thanks in Advance.
The easiest Method in this case would be to set the Filter Property of the Form to the value selected from the Company Combo Box after its Update() Event:
Expand|Select|Wrap|Line Numbers
  1. Private Sub cboCompany_AfterUpdate()
  2. If Not IsNull(Me![cboCompany]) Then
  3.   Me.Filter = "[Company]='" & Me![cboCompany] & "'"
  4.   Me.FilterOn = True
  5. End If
  6. End Sub
May 11 '07 #2

P: 74
The easiest Method in this case would be to set the Filter Property of the Form to the value selected from the Company Combo Box after its Update() Event:
Expand|Select|Wrap|Line Numbers
  1. Private Sub cboCompany_AfterUpdate()
  2. If Not IsNull(Me![cboCompany]) Then
  3.   Me.Filter = "[Company]='" & Me![cboCompany] & "'"
  4.   Me.FilterOn = True
  5. End If
  6. End Sub

Thanks a Bunch This works awesome
May 14 '07 #3

ADezii
Expert 5K+
P: 8,628
Thanks a Bunch This works awesome
You're welcome.
May 14 '07 #4

P: 5
Hi,

Thanks for posting this. I just used it and it works great. I was wondering if you could help me with a similar problem though. I have 2 combos and I would like to be able to filter just like this but based on both of them.
My first combo has usernames and the second one has company names. So I would like users to be able to pick their name from the first drop down and then pick the company name from the second drop down list so they can see what issues for that company are assigned to them.
Jan 2 '09 #5

ADezii
Expert 5K+
P: 8,628
@linwork
Kindly Post this request in a new Thread.
Jan 3 '09 #6

Post your reply

Sign in to post your reply or Sign up for a free account.