export query data to excel to create a mailer

A

Amy Schmid

Good morning,

We are attempting to create a mailer for an open house invitation. We have
in existance mutiple mailers that we consistantly use. However, on this one
particular mailer we are running into problems. The data we are asking for
on the query is not populating our mailer correctly.

We select our mailer information from our Practice Management program, which
is where we have all of our client information and is linked to our Access
database. In this particular mailer, we have chosen companies with a contact
name and individuals with no specific contact name.

For some reason, it is only recognizing those clients chosen that have a
contact name. It is not recognizing those chosen with no contact name. Both
have data in the Mailing Name field (either the company name or the
individual name (Mr. & Mrs. J . . .))

Any suggestions would be most appreciated. If you need more information,
please contact me. I have posted SQL view below.


Here is the query data:

SELECT dbo_Clients.ID, dbo_MM_Group_Code.SortName, dbo_Clients.Engrelated,
dbo_MM_Group_Code.GroupName, dbo_Clients.Cltnum, dbo_Clients.Cltname,
dbo_Clients.Engdept, dbo_Clients.Engaddr1, [ClcFname] & " " & [ClcLname] AS
ContactName, dbo_Clients.CBMFname, dbo_ClientContact.ClcContact,
dbo_ContactCategory.CCategory, dbo_Clients.CPPLname, dbo_Clients.Cltsort,
IIf(IsNull([subqry: MailersClients].ClcCltID),"","Yes") AS ClientOnly,
IIf(IsNull([subqry: MailersContacts].ClcContact),"","Yes") AS YesField,
dbo_Office.OffName, dbo_Clients.Engstatus
FROM (((((dbo_Clients LEFT JOIN dbo_ClientContact ON dbo_Clients.ID =
dbo_ClientContact.ClcCltID) LEFT JOIN [subqry: MailersContacts] ON
dbo_ClientContact.ClcContact = [subqry: MailersContacts].ClcContact) LEFT
JOIN [subqry: MailersClients] ON dbo_Clients.ID = [subqry:
MailersClients].ClcCltID) LEFT JOIN dbo_ContactCategory ON
dbo_ClientContact.ClcCategoryId = dbo_ContactCategory.ID) INNER JOIN
dbo_Office ON dbo_Clients.Cltoff = dbo_Office.OffID) INNER JOIN
dbo_MM_Group_Code ON dbo_Clients.Engrelated = dbo_MM_Group_Code.GroupID
WHERE (((dbo_Clients.Cltnum)<"008000") AND ((dbo_Clients.Engstatus)<>1) AND
((dbo_Clients.CMaster)=1) AND ((dbo_ClientContact.Deleted) Is Null Or
(dbo_ClientContact.Deleted)=0))
ORDER BY dbo_Clients.Cltnum;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top