loop query

G

geebee

hi,

i have an access query that i would like to just have in VBA access. the
reason is because i want the query to loop through a list of condition maybe
stored in a table. so i would have something like...

SELECT
FROM
WHERE building = "VARIABLE_FROM_TABLE"

how can i do this?

thanks in advance,
geebee
 
J

John W. Vinson

hi,

i have an access query that i would like to just have in VBA access. the
reason is because i want the query to loop through a list of condition maybe
stored in a table. so i would have something like...

SELECT
FROM
WHERE building = "VARIABLE_FROM_TABLE"

how can i do this?

thanks in advance,
geebee

This is almost certainly NOT a good way to go about this. You can simply join
the conditions table.

What are these tables? How are they related? What real-life problem are you
trying to solve?

John W. Vinson [MVP]
 
M

Marshall Barton

geebee said:
i have an access query that i would like to just have in VBA access. the
reason is because i want the query to loop through a list of condition maybe
stored in a table. so i would have something like...

SELECT
FROM
WHERE building = "VARIABLE_FROM_TABLE"

how can i do this?


Maybe you can and maybe not. It depends on what's in the
two tables.

In general, you can not put a criteria in an expression or a
field, because the query processor expects expressions and
field to return a value, not something that requires parsing
and reevaluation.

OTOH, there are ways that you can get a lot of mileage out
of a value in a query expression.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top