mail merging. and table linking. pleasehelp!!

john doe the 3rd

New Member
Joined
Mar 13, 2004
Messages
47
hi all .
i am having a bit of trouble with linking 2 tables together and merging them as one.
once i have linked the 2 tables for example Customer name in table 1 to pet name in table 2 and then create a query and merge i only get the ability to input merge fields either from customer table 1 or pet table 2, i need to make a letter with the following fields as an example.

< < customer address> >(table1)
dear mr < < customer name > > (table1)

your pet < < pet name> > (table2) is due for a check up. please make sure to bring < < pet name > >'s ( table2) log book and details with you.

i must not combine the 2 into my own table i must use table linking , that is the main objective of the task.

thx in advance
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
There has to be something in the tables that matches like an ID# that kinda says these two Items are equal by linking the fields you mentioned it makes the field think Pet Name and Customer Name are the same thing
Try linking the primary keys of the tables and see if that helps.

if your using the names as the primary keys then try adding a field to each table ID# and you do not have to make it a primary key on either table. if the person has more than one pet you can add the Id number for the owner to each pet it sould create an entry for each one

but I'm not sure if this is what your looking for
hope it helps
 
Upvote 0
both tables contain customer_number.linking the primaries which are
customer number in table 1 and pet number in table 2 distorts the query results, i get inccorrect values.

basically this is how the 2 tables are set up
table 1 contains customer name , title , adress, postcode, tel no, customer number.
table 2 contains customer number, pet number, pet name, pet type, last month of visit, last year of visit.

i need the query to search for the records based on the last month of visit and last year of visit which i have worked out , howveer i have a problem when the results are displayed. they are not correctly organised.
for example customer number 1 could have pet number 14 pet name rex last visit november , last year 2002.
however sometimes this is mixed up so i end up with
customer number 1 has pet number 1 named chloe last visit november last year 2002. they arnt organising correctly i think i am doin it right tho....
 
Upvote 0
Sorry it took so long

I've looked at the database you had
I would make a couple of changes to your query
First Take the Criteria out When you use criteria you need words like "Like"
before you use criteria
next remove the second Customer ID out of the grid (below the Two tables) you don't need it there twice. Next right click and choose Sigma or Totals. You will see it say group by in the grid In you Last Month and Last Year Choose group by Last
this will bring all your last entrys buy customer and choose decending in the sort box this will bring all the latest to the top of list

now you list should be organized by last in both field and should be organized correctly.

if you need to filter so you only see the last put in criteria Like "NOV" and change as needed. It will only display NOV entries

I hope this helps
 
Upvote 0

Forum statistics

Threads
1,221,672
Messages
6,161,200
Members
451,688
Latest member
Gregs44132

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top