CharlesWhiteman
Registered User.
- Local time
- Today, 23:41
- Joined
- Feb 26, 2007
- Messages
- 421
In My Db I have TblDatabase (contains company details) and TblContacts (contact details relating to the company joined on a one-many relationship.
I also have Tbl calls which records contact history with each company.
I made a query to output a report based on the source of the Company. What i am finding is that companies which have more than one contact, the contact history repeats itself by the number of contacts in the company, can anybody point me in the right direction. Here is my query:
SELECT DISTINCT TblDatabase.CompanyName, TblDatabase.RegisteredDate, TblDatabase.City, TblDatabase.WebSiteAddress, TblDatabase.BusinessDescription, TblCalls.[Call Note], TblDatabaseContacts.[First Name], TblDatabaseContacts.[Email Address], TblCalls.Result
FROM (TblDatabase INNER JOIN TblCalls ON TblDatabase.CompanyCode = TblCalls.CompanyCode) INNER JOIN TblDatabaseContacts ON TblDatabase.CompanyCode = TblDatabaseContacts.CompanyCode
WHERE (((TblDatabase.Source)=[forms].[FrmSourceReport].[ComboSource]));
I also have Tbl calls which records contact history with each company.
I made a query to output a report based on the source of the Company. What i am finding is that companies which have more than one contact, the contact history repeats itself by the number of contacts in the company, can anybody point me in the right direction. Here is my query:
SELECT DISTINCT TblDatabase.CompanyName, TblDatabase.RegisteredDate, TblDatabase.City, TblDatabase.WebSiteAddress, TblDatabase.BusinessDescription, TblCalls.[Call Note], TblDatabaseContacts.[First Name], TblDatabaseContacts.[Email Address], TblCalls.Result
FROM (TblDatabase INNER JOIN TblCalls ON TblDatabase.CompanyCode = TblCalls.CompanyCode) INNER JOIN TblDatabaseContacts ON TblDatabase.CompanyCode = TblDatabaseContacts.CompanyCode
WHERE (((TblDatabase.Source)=[forms].[FrmSourceReport].[ComboSource]));
Last edited: