Filter by Query

B

Bunky

I have a form with 2 subforms. The main form has data from 1 table while the
other 2 subforms are from 2 other tables. When the client wants to only see
certain records, I have a Macro running to execute a query to populate the
screen with just the records needed. Due to some re-designing, I now have
part of the criteria on one table and part on another table and it is getting
weird pop up boxes. I have tried having one query feed a second query but
that does not work either. When I just execute the queries without trying to
show the screen, it works perfectly. Ideas?

Thank you for your time.
 
A

Arvin Meyer [MVP]

One query can feed a second query. I have done multiple stepped queries (as
many as 6 or 7) at a time. The popup boxes that you are seeing are asking
for parameters that the form not longer can find. Of all your queries work,
and you cannot find the problem in the form, you may have to rebuild the
form. Try opening each of the subforms first. It may be a fixable problem
with one of them.
 
B

Bunky

Arvin,

I have rebuilt the forms and have not had any luck yet. The form in
question has a option group on it that has the value stored in the table
element that is giving me fits. The query only wants records where
OptionChosen = null or 0 or 2 or 4 or 7 or 8 or 11. The popup says it wants
a value for Comments.OptionChosen. Comments is the name of the table. I
even put OptionChosen on the subform to see if that would make a difference.
nothing. Any other Ideas?
 
Top