Equivalent of vlookup in access?

  • Thread starter Thread starter kermite
  • Start date Start date
K

kermite

Guest
Hi,

I have two access tables :

Table 1 : Customer number / E-mail

Table 2 : Customer number / Address / Phone

I like to add the data of table 1 to table 2 :

Customer number/ Address /Phone / E-mail

When of course the customer number is matching in both tables .

Can someone help me ?

Thanks
 
This would be done via a query. Match records on Customer Number, then you can either use this query, create a new table with all the fields in or add the fields to table 1 and make the query an update query.
 
No you don't. There's no need to store the same infomation in two tables. What you need is a query that joins the data together using the customer number as the join field.

If, on the other hand, you are restructuring your data so that you can eliminate one of the tables and this is a one off exercise, then you need an update query.
 
neileg said:
No you don't. There's no need to store the same infomation in two tables. What you need is a query that joins the data together using the customer number as the join field.

If you had RTFP, you would of seen I offered all the options; using the existing query, appending to one of the existing tables, or creating a new one. With the small amount of information given, I thought it was better off leaving more options for the OP to decide what was the better option.
 
Don't get agitated, reclusive monkey. If you look at the times of the postings you will see that I was posting at the same time as you, and the 'No you don't' comment was directed at the original poster.

In fact, there are three possible answers, a select query, an update query or a make table query, so neither you nor I covered all the options!
 
Hi,

Yes I need to make an update query .

Can you explain step by step how to do this ?

I have tried following the help function in access but not very successfully :(

Many thanks
 
Firstly, you need to create an "Email" field in your table 2 to accomodate the new data. Next, create a query combining the two tables. Change the query to an update query, and set the email field in the query to match the email field in the table. If you preview the query first, remember that it will show the email field as blank; these are the records which will be updated; the values won't actually show until you have run the update query.
 
Hi,

I have a follow up question on this one. How do you create a query combining the two tables? How do you change it to an update query??

Thanks
 
Hi,

I have a follow up question on this one. How do you create a query combining the two tables? How do you change it to an update query??

Thanks
And please try not resurrect old threads. This one is 7 years old.
 

Users who are viewing this thread

Back
Top Bottom