It seems the error is in the query itself
you can't execute a select query
you need insert/update/delete queries
(DDL statements are also supported (ie create table , drop table etc)
I was assuming that the problem was suppressing "This Query will.." type of
messages
HTH
Pieter
anthony said:
This is the post from Pieter in case you haven't read it...
Don't Use DoCmd.... (DoCmd.OpenQuery or DoCmd.RunSQL)
Use
CurrentDb.QueryDefs("QueryToRun").Execute
HTH
Pieter
Have you created the query yet? if you have, just plug in the name of the
query and replace QueryToRun with it. If you need to create query on the
fly, you can use the CreateQueryDef() method to create the query in the
code. Let me know if you need to do that.