473,407 Members | 2,546 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,407 software developers and data experts.

Combo Box Filtering issues

34
I am trying to create a series of combo-boxes that filter the viewable records by the values listed. There are several combo-boxes per form and several thousand records that will be filtered. See attached screenshot for an example.


What I am trying to do is create a filtering rule that filters out all but the values selected in any/all the combo-boxes, while allowing navigation to all the records that match the criteria in the combo boxes.

Here is the very basic filtering rule I have created, but does not seem to be functioning:

Expand|Select|Wrap|Line Numbers
  1. Sub CAR_AfterUpdate()
  2.     Dim rs As DAO.Recordset
  3.  
  4.     If Not IsNull(Me.CAR) Then
  5.         'Save before move.
  6.         If Me.Dirty Then
  7.             Me.Dirty = False
  8.         End If
  9.         'Search in the clone set.
  10.         Set rs = Me.RecordsetClone
  11.         rs.FindFirst "[CAR] = """ & Me.CAR & """"
  12.         If rs.NoMatch Then
  13.             MsgBox "Not found: filtered?"
  14.         Else
  15.             'Display the found record in the form.
  16.             Me.Bookmark = rs.Bookmark
  17.         End If
  18.         Set rs = Nothing
  19.     End If
  20. End Sub
I have used this code on all of my combo-boxes, substituting the appropriate references. I know very little about VB coding and it took me two days just to make this basic filter rule. On a form with a single combo-box this works great for navigating to specific records, but it doesn't work here. Please, any help would be wonderful. Thank you.

** Edit **

Attached Images
File Type: jpg screenie.jpg (65.4 KB, 696 views)
Aug 10 '10 #1

✓ answered by jimatqsi

Perhaps this will help. It is a bytes.com insight article by NeoPa explaining all you need to know about dynamic filtering of a form.

http://bytes.com/topic/access/insigh...filtering-form

Jim

4 2375
jimatqsi
1,271 Expert 1GB
Perhaps this will help. It is a bytes.com insight article by NeoPa explaining all you need to know about dynamic filtering of a form.

http://bytes.com/topic/access/insigh...filtering-form

Jim
Aug 11 '10 #2
MOCaseA
34
Thank you. I found that about an hour after I posted this, and the form is working correctly now.
Aug 11 '10 #3
NeoPa
32,556 Expert Mod 16PB
I'm impressed that you realised to post your question in its own thread. I wonder if you realise though, that a link to that same article was already posted in the thread you asked the question in originally.

I'm only curious as I was planning to moderate your post anyway to move it to its own thread, but you did it for me. Saved me a job, which is always good :D
Aug 12 '10 #4
MOCaseA
34
Moved to a new thread...
Sep 24 '10 #5

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

Similar topics

3
by: Jason | last post by:
I am trying to filter records in a primary form based on records in related tables. The data in the related tables is being displayed in the primary form through subforms. To be more specific, I...
2
by: Sean | last post by:
Greetings all, I am attempting to make a form that will filter through several tables that (I believe) have refretial integrity. I am pulling data from several tables into the form and i would...
1
by: MLH | last post by:
I have a form (xxxxxxxxxxxxxx) with a combo-box control (yyyyyyyyyyyyyy). The rowsource property for that combo box is as follows: SELECT DISTINCTROW ., . FROM ; The SQL for qryVehicleList...
3
by: Mike Jakes | last post by:
I hope that someone can offer a little advice on this one - I've searched the group but can't find an answer. I think that I'm doing something really stupid or missing something trivial, but see...
1
by: hackerslacker | last post by:
I have an ordering form that use two combo boxes to filter down the records of a Products table. This worked fine with the after_Update of the first filtering the records and creating the...
2
by: Dev1 | last post by:
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...
3
by: flymo | last post by:
Hello All, I've bee trying out access 2007 and have a weird issue and would like to see if I'm issing something really basic. I have a form based on a query, I create a combo to look for records...
5
by: RHooper | last post by:
Hi, I'm new to Access, so I apologize if this question is trivial. I am trying to set-up a quick filter for users to define on a form bound to a table. I have a combo box called...
3
by: linwork | last post by:
Hi, I was wondering if you could help me with a problem. I have 2 combos in an access form and I would like to be able to filter based on both of them. My first combo has usernames and the...
4
by: phill86 | last post by:
Hi, Bare with me this is going to take some explaining and any help is much appreciated I have a form that stores details of sessions which include start/end date start/end time these...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.