loop query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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]
 
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.
 
Back
Top