473,388 Members | 1,198 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Drop Down Combo Filtering

38
All-

I'm new to this forum and i've been working with acces for about 2 days now. I have a form in which I have two combo boxes and depending on what is selected on the first dropdown the second one gets populated accordingly, which is great! There are two problems;

First the when I select the value from the second drop down the value in the first and second combo box go away!!

Second when I remove the filter the values for all the other text fields show up and I can scroll through each record. So it appears that my filter is not working in the way I want it to which is when the Second value is picked from the combo box all subsequent text fields will be popluated. A little back ground: there is only one table, I have include the following in the first combo box event procedure:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Combo81_AfterUpdate()
  2.     If IsNull(Me.Combo81) Then
  3.         Me.FilterOn = False
  4.      Else
  5.         Me.Filter = "Company= """ & Me.Combo81 & """"
  6.         Me.FilterOn = True
  7.     End If
  8. End Sub
to incorporate the filtering. The second combo box is bieng fed via a query as such:
Expand|Select|Wrap|Line Numbers
  1. SELECT DISTINCT [Sales Funnel1].Company
  2. FROM [Sales Funnel1]
  3. WHERE ((([Sales Funnel1].[ASC Rep Reporting])=Forms!Opportunity!Combo83))
  4. ORDER BY [Sales Funnel1].Company;
Any thoughts would be greatly apprieciated!!

-Dev1
Feb 14 '08 #1
2 2588
sierra7
446 Expert 256MB
Hi
I understand what you are trying to do and Access is very good at this sort of thing, but I have got lost trying to follow your code.

I take it that your first combo box is Combo81 but why does your Select statement refere to Combo83 ? It looks like it is on a separate form ?

Also, Combo81 has already selected for 'Company', so presumably your second combo box will be selecting on some other field but it seems to be selecting 'Company' again. I give up.

Give a bit more detail and I (or someone) can try again

S7
Feb 20 '08 #2
NeoPa
32,556 Expert Mod 16PB
Try checking out Example Filtering on a Form.

PS. Quotes withIN a SQL string (Filters etc) should ideally be single-quotes ('). This is also easier to work with as they are not confused with VBA string delimiters ("). Check out Quotes (') and Double-Quotes (") - Where and When to use them.
Feb 20 '08 #3

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

Similar topics

2
by: Phil Longworth | last post by:
Im very new to Access 97 and Im sure I should be able to do this but cant work out how. Im bulding a database for my stamp collection. I have two tables; one with details of all the individual...
1
by: Dec | last post by:
Ok to simplify things I'll just give an example. This is pretty much what I want to do (minus the postcode): http://www.perrys.co.uk/usedcar?ID=F5J9BNNBMVK00DF I have relatively little...
5
by: Paul | last post by:
I have read the posts on using Sendkeys to dropdown the list in a combo box. However, doesn't that require the combo box to have the focus? My situation is a little different. I have a text...
2
by: kmnotes04 | last post by:
Is it possible to link one drop-down box to another? For example, if a name is chosen from a drop-down list, can another drop-down list then automatically display the person's office as a result of...
17
by: Aussie Rules | last post by:
Hi, I want to have a single line combo box dropdown, but where i can selected multiple items in the drop down via a check box... I can see one in the standard tool box... is there one ? If...
1
by: It's Shroff | last post by:
I apologize in advance if I'm posting the wrong groups, but I have a general UI problem in my Windows apps that I'm wondering how other people may have solved. I am using VB.NET to devlope this...
7
by: callawayglfr | last post by:
I am building a database in access where I have a drop down box that relates to a text box, that part I have working but when someone selects information from the first drop down I need it to limit...
2
by: shaznay2 | last post by:
I need some help! I'm trying to set up two drop down menus where the first displays the Department and the second displays the names of the printers found in the department. So far i have two...
30
ADezii
by: ADezii | last post by:
This week’s Tip of the Week will clearly demonstrate how you can dynamically set the Drop Down List Width of a Combo Box to the length of the longest item in its Row Source. The inspiration for this...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.