Cascing combos WITH query

  • Thread starter Thread starter dizziness
  • Start date Start date
D

dizziness

Guest
Pardon my relative lack of knowledge....

I'm building a database for creating sales proposals. I have combo boxes in fmRoomDetails which combo1 selects a product category and combo2 selects a manufacturer. My third combo box Product allows for results of a query of a product table tbProducts given the two previous selections. The query works great until you try to add another item, then the third combo previously entered disappears. I know that combo3 is working as the key columns work fine. If I hide the key though, then the combo goes blank.

My explanation may not be too explicit, so here's a copy. Any suggestions are appreciated.

Pardon the file length.

Chris
 

Attachments

When you speak of the third combo box, are you talking about ModelID?
 
You might want to look at this word document I prepared a while back to explain the steps involved in setting up cascading combo boxes.

HTH
 

Attachments

Thanks

Thanks skwilliams,

The document was a big help. No need to build complecated queries. DOn't know why I felt obligated to do so. Instead of matching model ID, I can just do a text match later anyway. Thanks again!

Chris
 
Hello all,

This is my first post, and I'm looking forward for many more.
I have a very similar example to the attachment by skwilliams but I must be missing something since it is not working for me.

My table is PurchaseOrderODetails, the fields are PONo, ItemNo, BatchNo, Pallets, Weight, QtyRec
Main form: ShippingOrderForm, Subform: ShippingOrderDetailsForm
1st combo: ItemNo (record source: SELECT DISTINCT qry_ItemByBatch.ItemNo FROM qry_ItemByBatch ORDER BY qry_ItemByBatch.ItemNo; ) (Private Sub ItemNo_AfterUpdate()
Me.PONo.Requery End Sub)
2nd combo PONo (record source: SELECT DISTINCT [PONo] FROM PurchaseOrderODetails WHERE ((PurchaseOrderODetails.ItemNo)=Forms!ShippingOrderForm!ShippingOrderDetailsForm.Form!ItemNo); )

My issue is that when I select an ItemNo I will get the correct PONo's in the PONo combo box, but after selecting the correct PONo, all the previous PONo records will get the same PONo I just selected. I need to be able to select a PONo for the current ItemNo and keep the previous records intact.
 

Users who are viewing this thread

Back
Top Bottom