Cascading Combo boxes and rs.findfirst

Gaccesses

Registered User.
Local time
Today, 09:34
Joined
Mar 13, 2012
Messages
40
Hi ,

Hoping someone can help as I have been working on this for a few weeks now.

I have 3 cascading combo boxes. I want to filter a form with these three combo boxes.
ComboA - Model
ComboB - Make
ComboC - Date purchased

The cascading combo boxes work fine.. but in regards to filtering, I am having trouble.

I can filter the form only through ComboA at this time using the code below.
When I also try to use Combo B.. to match the make to the model and filter for that specific car and make.. the code takes me to the very first make.. but for a different model.

Please Help!

The goal is to use all cascading combo boxes ( A-C) to filter a form.

My code is ..

ComboA_AfterUpdate()
set rs = Me.Recordset.Clone
rs.FindFirst = "[Model] = ' " & Me.ComboA & ' "

if not rs.EOF then Me.Boomark= rs.Bookmark

end sub

ComboB_AfterUpdate()
set rs = Me.Recordset.Clone
rs.FindFirst = "[Make] = ' " & Me.ComboB & ' "

if not rs.EOF then Me.Boomark= rs.Bookmark

end sub
 
I have tried this before, but will try this again. Where would I place it ? ComboC afterupdate?
 
OK I will try this too.. my code is all jacked up at this point
 
Ok this is sad.. so far its only filtering the primary key within the combobox.. i will have to get back to this tomorrow.
 
Last edited:
Your solution fixed my issue. Now I can finally move on.. thank you for your expertise, guy!

For those who may be using this.. the code needs a few more quotes:

Code:
Me.Filter = "[Model] = '" & Me.ComboA & " AND [Make] = '" & Me.ComboB & "'" Me.FilterOn = True
Something like that.... You have to work on it depending on whether the column you are referencing is numeric or alpha numeric or alpha.. Good luck!.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom