I have a table which is a list of clients that we are sending to another company to contact for updating their account. I have a second table that is the other company's report back to me telling which of those clients they reached, what the outcome of that contact is, whether additional product was sold, etc. I would like to create a report which merges the records so I can see how many leads I outsources, how many contacts and sales were made and any other information they send me such as whether the client has a complaint that needs to be referred to my CSRs. I also want to know how many leads I gave on a certain date. Can anyone help? This is a project that was due last week but all my study and attempts have led me only to frustration. There are common pieces of information in both tables ie clients names, accountID ( I set this as the primary key in both tables), sales group and phone numbers. Each of the tables has a few fields not in the other table.
8 1988 MMcCarthy 14,534
Recognized Expert Moderator MVP
You need to get the query right. Consider your first table as the master table and link the two tables based on AccountID as follows. You can include fields from both tables. -
SELECT t1.AccountID, t1.ClientName, t2.Field1, t2.Field2
-
FROM Table1 As t1 LEFT JOIN Table2 As t2
-
ON t1.AccountID = t2.AccountID
-
Mary
Thanks for your help Mary but I am still stuck. I guess I didn't give you enough information. Each of these reports comes to me daily. They are Excel documents. I have linked each one into access but I am unable to pull all of each set of reports into one table. Do I have to append each one into a single table for each group?
MMcCarthy 14,534
Recognized Expert Moderator MVP
Forget the report for the moment. You have to look at this as a query first. If the query is right the report will be easy. If you provide the metadata of the two tables (It might be a good idea to import rather than link to excel) and details of exactly what you want in the output I will try to help further.
Here is an example of how to post table MetaData : Table Name=tblBookings - Field; Type; IndexInfo
- Field; Type; IndexInfo
-
StudentID; Autonumber; PK
-
Family; String; FK
-
Name; String
-
University; String; FK
-
Mark; Numeric
-
LastAttendance; Date/Time
Here is a query that has just the Master Table
SELECT [MASTER EOG].ACCOUNTID, [MASTER EOG].PUBCODE, [MASTER EOG].NAME, [MASTER EOG].PIATYPE, [MASTER EOG].FOD, [MASTER EOG].SUBSLNGTH, [MASTER EOG].RATECODE, [MASTER EOG].CURRENTBAL, [MASTER EOG].EOGDATE, [MASTER EOG].TELEPHONE, [MASTER EOG].ASSIGNDATE
FROM [MASTER EOG];
Here is the query that has the other table - CLC Reports
SELECT [CLC REPORTS].AccountID, [CLC REPORTS].Name, [CLC REPORTS].PubCode, [CLC REPORTS].Telephone, [CLC REPORTS].RateCode, [CLC REPORTS].EOGDate, [CLC REPORTS].CallType, [CLC REPORTS].Result1, [CLC REPORTS].Result2, [CLC REPORTS].Comment, [CLC REPORTS].CCType, [CLC REPORTS].CCNbr, [CLC REPORTS].CCName, [CLC REPORTS].CCExpire, [CLC REPORTS].CCAmount, [CLC REPORTS].BankName, [CLC REPORTS].BankNumber, [CLC REPORTS].AccountNumber, [CLC REPORTS].CheckNumber, [CLC REPORTS].BankAmount, [CLC REPORTS].REPORTDATE
FROM [CLC REPORTS];
I appended all the excel reports into two separate tables Master EOG and CLC Reports. Then, just to make sure they would work, I pulled each table into a query. I am not certain how I put the code into a new query. This is all very new to me and I appreciate your patience. Pat
MMcCarthy 14,534
Recognized Expert Moderator MVP
Try running this query -
SELECT [MASTER EOG].ACCOUNTID, [MASTER EOG].PUBCODE, [MASTER EOG].NAME,
-
[MASTER EOG].PIATYPE, [MASTER EOG].FOD, [MASTER EOG].SUBSLNGTH,
-
[MASTER EOG].RATECODE, [MASTER EOG].CURRENTBAL, [MASTER EOG].EOGDATE,
-
[MASTER EOG].TELEPHONE, [MASTER EOG].ASSIGNDATE, [CLC REPORTS].AccountID,
-
[CLC REPORTS].Name, [CLC REPORTS].PubCode, [CLC REPORTS].Telephone,
-
[CLC REPORTS].RateCode, [CLC REPORTS].EOGDate, [CLC REPORTS].CallType,
-
[CLC REPORTS].Result1, [CLC REPORTS].Result2, [CLC REPORTS].Comment,
-
[CLC REPORTS].CCType, [CLC REPORTS].CCNbr, [CLC REPORTS].CCName,
-
[CLC REPORTS].CCExpire, [CLC REPORTS].CCAmount, [CLC REPORTS].BankName,
-
[CLC REPORTS].BankNumber, [CLC REPORTS].AccountNumber, [CLC REPORTS].CheckNumber, [CLC REPORTS].BankAmount, [CLC REPORTS].REPORTDATE
-
FROM [MASTER EOG] LEFT JOIN [CLC REPORTS]
-
ON [MASTER EOG].ACCOUNTID=[CLC REPORTS].ACCOUNTID;
-
Mary
It gives me the error: "Type mismatch in expression."
I figured out the error, one Account ID was text, the other number. I changed them both to text and it worked! Thank you, thank you, thank you.
MMcCarthy 14,534
Recognized Expert Moderator MVP
I figured out the error, one Account ID was text, the other number. I changed them both to text and it worked! Thank you, thank you, thank you.
You're welcome.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Themis Papassilekas |
last post by:
So, I don't know how tricky this is, but thought I'd ask...
Here in the office there's an inventory db that was written in Access 2.0.
Nobody cared to upgrade it since its creation back in an era...
|
by: dog |
last post by:
I've seen plenty of articles on this topic but none of them have been
able to solve my problem.
I am working with an Access 97 database on an NT4.0 machine, which has
many Access reports.
I...
|
by: Grasshopper |
last post by:
Hi,
I am automating Access reports to PDF using PDF Writer 6.0. I've
created a DTS package to run the reports and schedule a job to run this
DTS package. If I PC Anywhere into the server on...
|
by: Olav.NET |
last post by:
I am a .NET/C++ developer who is supposed to do some work with Access.
I do not know much about it except for the DB part.
Questions:
*1*
I am looking for INTENSIVE books to get quickly up to...
|
by: com |
last post by:
Extreme Web Reports 2005 - Soft30.com
The wizard scans the specified MS Access database and records
information such
as report names, parameters and subqueries. ......
| |
by: Neil |
last post by:
We are running an Access 2000 MDB with a SQL 7 back end. Our network guy is
upgrading to Windows Server 2003 and wants to upgrade Office and SQL Server
at the same time. We're moving to SQL Server...
|
by: Brad |
last post by:
Thanks for taking the time to read my question.
I have a table of data that has Date, Data and Category. I need to
show, in
a report, each Categories Data by Date. The Date has to be it's own...
|
by: Mell via AccessMonster.com |
last post by:
Is there a way to find out where an application was created from?
i.e. - work or home
i.e. - if application sits on a (work) server/network, the IT people know the
application is sitting...
|
by: Neil |
last post by:
I posted a few days ago that it seems to me that the Access 2007 rich text
feature does not support: a) full text justification; b) programmatic
manipulation.
I was hoping that someone might...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |