2 Queries together?

K

kabaka

You don't give enough detail to answer your question precisely, so forgive me
if this has nothing to do with your problem.

From a form put on a button with the On_Click() code as something like:

Sub btn_On_Click()

Docmd.setwarnings false
docmd.openquery "Query1"
docmd.openquery "Query2"
docmd.setwarnings true

End Sub

This will run query1 and then query2

Hope it helps
 
B

B_Lyles

Well, this is what I really, really want to do: I have one query than return
what items are under the minimum stock and in what area and the other return
what items are over the minimum stock and what area. Ideally, I would like to
have possibly 1 query that returns what under the minimum stock and also
returns where it is over the minimum stock so we can easier see what we can
move from where.
 
K

kabaka

Try a Union query to get 2 queries into one. Something like:

Select YourTable.area, YourTable.quantity from YourTable where
YourTable.quantity<SomeMinValue
Union
Select YourTable.area, YourTable.quantity from YourTable where
YourTable.quantity>SomeMaxValue

Instead of going to design view for your query go to SQL view and type it in
there (you can't do a union query from design view)

(The syntax may not be perfect since it is off the top of my head, but this
should give you somewhere to go from.)

Good Luck
 
J

John Vinson

Well, this is what I really, really want to do: I have one query than return
what items are under the minimum stock and in what area and the other return
what items are over the minimum stock and what area. Ideally, I would like to
have possibly 1 query that returns what under the minimum stock and also
returns where it is over the minimum stock so we can easier see what we can
move from where.

I'd suggest using a Report with two Subreports, each based on its own
query.

John W. Vinson[MVP]
 
Top