Cascading comboboxing in subforms trouble.

Aeon.Divine

< Random Learner. >
Local time
Today, 11:47
Joined
Mar 25, 2008
Messages
55
Hi there again, here's the trouble this time:

TABLES:

PRODUCTS TABLE ( Individually listed products to be refered to in a detail. )
COLOUR TABLE ( Colours available in the market for each product )
PURCHASE ORDER TABLE ( Orders containing some client fields and a certain number of bought items and some related fields ( PRODUCTS AND DETAILS. ))
DETAIL TABLE ( Related fields to certain products to be adressed in a bought order. )

As you can see, there are several colours for each products, several details for each product. And several details with its product to be refered in a purchase order.

Now, my purchase order form, contains a subform to input the details, this subform contains a combobox to select what product are we talking about, an several fields to be completed. One of the fields called colour, should be filled only with a colour adressed to that product in the colour table. A second combobox in the color field of the subform, it's meant to generate its rows from a query that filters only the colors asigned in the color table to the particular item, previously selected in the first combobox. The problem, its the query does not always show the rows of the registry in which it's on, but instead sometimes the rows of the previous item remain in the combobox, giving me false options to choose from. Thats what happens when i open just the subform independently, instead of completing itself wrongly, the second combobox asks me for the first combobox result (which its in fact completed) when trying to using as a query criteria.

I would certainly apreciate any ideas to solve the loading issue and the missing info problem, thanks in advance!
 
Any chance you can post the db?
 
Here it goes, sorry but its in spanish. Let me give you the basics; the subform with the problem its called "Subformulario Detalles C Consulta", the second combobox which doesnt refresh its contents, mantaining the old values after changing registries its called, color. You can check the error generating a registry in the subforum for a product ( PRODUCTO ) called "pendejo", this product has already registered some colours to it. check if the second combobox shows them, and then generate a second registry with any other product, and the second combobox will show no colour, cause no one is registered. Finally, return to the first registry and open again the second combobox, it will show no value, though its on the pendejo registry.

I hope it doesnt makes itself too hard.. Thanks, and good luck.

---

Geee, its seems like i founded the mistake while i was asking, the error went away just with adding

Private Sub Form_Current()
Me.Color.Requery
End Sub

Thanks anyhow boblarson, you're always eager to help.
 

Attachments

Last edited:

Users who are viewing this thread

Back
Top Bottom