access query not appearing in list of data options in word

User avatar
Peter Kinross
5StarLounger
Posts: 962
Joined: 09 Feb 2010, 00:33
Location: Patterson Lakes, Victoria, Australia

access query not appearing in list of data options in word

Post by Peter Kinross »

Trying to create a Word mail merge for emailing. The data is in an Access query. But the query does not appear in the list of queries from this Db that Word presents. Many other queries appear, but not this one. The query is not a union query.
Here is the SQL in case that helps.
SELECT DISTINCTROW tblContacts.ID, tblContacts.LastName, tblContacts.FirstName, tblContacts.EMail, tblContacts.FileFolder
FROM ([Contact Type] RIGHT JOIN tblContacts ON [Contact Type].Client = tblContacts.Client) INNER JOIN ((Policies INNER JOIN [Pol Contents] ON Policies.[Pol no] = [Pol Contents].[Pol No]) INNER JOIN qryLatestFund ON [Pol Contents].[Sales No] = qryLatestFund.PolSalesNo) ON tblContacts.ID = Policies.ClientID
WHERE ((([Pol Contents].Status)="Completed" Or ([Pol Contents].Status)="processing") AND ((Policies.Co)="Netwealth" Or (Policies.Co)="NWealth IP") AND (([Contact Type].Client)=2))
ORDER BY Nz([LastName]) & Nz([Suburb]), [Contact Type].SortOrder
WITH OWNERACCESS OPTION;
Avagr8day, regards, Peter

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: access query not appearing in list of data options in word

Post by HansV »

Word cannot handle the Nz function - it is specific to Access.
Best wishes,
Hans

User avatar
Peter Kinross
5StarLounger
Posts: 962
Joined: 09 Feb 2010, 00:33
Location: Patterson Lakes, Victoria, Australia

Re: access query not appearing in list of data options in word

Post by Peter Kinross »

Ha ha. My workaround was to make the query a 'Make table' query and use that table as the data source. That works.
Fair dinkum (an Aussieism for really, seriously, truly), the depth of your knowledge is mind boggling.
Thanks Hans - again, again, again .... ad infinitum
Avagr8day, regards, Peter