Find record based on cascading combo box

sparklegrrl

Registered User.
Local time
Today, 15:52
Joined
Jul 10, 2003
Messages
124
Hello again!

I have a form that I created a combo box and cascading combo box on. The combo box is our customer list. The cascading combo box has parts by customer. These are working fine however, I need to find a record based on the parts selected.

I tried adding a combo box that finds a record but didn't know how to switch that to a cascading combo so I started from scratch and got it working but now I don't know how to filter.

Thanks in advance for your help and time!
 
Presumably the filter would get applied after the second selection. The trick would be it would likely have to use the first combo too (customer and part).
 
You lost me.
 
What was the filter that worked, and why did it fail after switching to cascading combos?
 
My apologies if I mispoke or didn't explain clearly. I meant that I got the cascading combo boxes working properly.

If you select the customer then that customers parts appear in the cascading box below. I need the selected part with it's details to appear in the form.


Love the Wino Moderator title btw! :P
 
Thanks! I figured I should own up to it. :p

If you make a stand-alone "find a record" combo, can you copy the code/macro to the cascading combo? Can you attach the db here?
 
Well, I can't see data types or test, so will make a wild guess at code for the second combo which assumes the customer field is numeric and the part field is text:

Code:
  Dim rs As Object

  Set rs = Me.Recordset.Clone
  rs.FindFirst "CustomerID = " & Me.PARTSCOMBO.Column(0) & " AND PartNo = '" & Me.PARTSCOMBO.Column(2) & "'"
  Me.Bookmark = rs.Bookmark
 
Excellent! You send it, I'll drink it! Include a note telling my wife to keep her mitts off of it. :p
 
Ha ha ha! Will do - don't have to do that w/my honey. He hates wine. It's mine..ALL MINE! *giggles*
 

Users who are viewing this thread

Back
Top Bottom