I have a select query to grab records from a table, but ONLY those records that match the customer numbers involved in my current transaction. Problem is, this starts from a form that has some generic header data, and a subform that contains the customer numbers I need. Picture it: I need to order 1000 more widgets (main form), because the following customer(s) (subform) want xxx widgets each.
So I need to first grab all those customer numbers (could be one to many), then tell my query to use only the numbers in that list. Scratching my head for a simple way to do both parts of that -- first capture a list of the numbers, then filter my query with some kind of "only if it's in this list" criterion. Any thoughts? (As far as I can tell, data in the subform is not stored anywhere until AFTER this process runs. I suppose I could put it in a temporary table or query, but hoping there's a simpler way than adding more objects.)


Reply With Quote
. Basically you need to use in your new Select query the same criteria that produces the subform's records, so look either at the subforms record source or the linking between subform and main form as I suggested in my previous post. Not much more advice possible if you do not show us something to illustrate your issue.
