Can VBA code change an existed query. The query on the left side of the window that you see and had written.
For example in the query is as:
SELECT *
FROM tb
WHERE fielda = “app”
To
SELECT *
FROM tb
WHERE fielda = “toys”
Can VBA code change an existed query. The query on the left side of the window that you see and had written.
For example in the query is as:
SELECT *
FROM tb
WHERE fielda = “app”
To
SELECT *
FROM tb
WHERE fielda = “toys”
You can change the SQL of a saved query with a DAO QueryDef. That said, in your example I'd just use a criteria pointing to a form control (a parameter query).
My query is more complex than that. That is just a simple example. Can you show me an example of how VBA can change an existed physical query ?