Mail Merge

Not Exactly coding and design but…

my database, has lots of queries, why can’t mail merge see them all?

My only suspision is that it’s because some of the queries are relient on data selected in a form, and even though the form may be open it has a seperat session open to the database and so can’t see what is selected? Am I close?

If this is the case how can I get round it?

Does your query contain lots of AND statements instead of OR statement. The effect will be different.

neither, for the most part they are generated by access,

I’ve gone with the easy option seeing as this will possibly need doing for a number of queries, I’ve made a function that just creatres a table from the results of the query in question. It’s not the most correct solution I’m sure but rather than rewrite git loads of code and queries I’ll just do this.

Function Mail_Merge(Qry As String)
Dim strsql
strsql = "SELECT * INTO [MailMerge] FROM [" & Qry & "]"

DoCmd.RunSQL strsql

End Function

None of the documents to be merged have been created yet so pointing them all to the same table will be no grief.

Thanks for putting your grey matter to the effort for me, sorry it was wasted.

Knowing almost nothing about Microsoft’s products as I do, i was going to suggest the simple method - output elsewhere. Never mind, as long as it works :slight_smile: