Update fields in table with queries

  • Thread starter Thread starter Denny
  • Start date Start date
D

Denny

I have two tables in an address database. Each table
contains fields for a persons name and address. One
table contains updated address information while the
other contains old address info. I need to update the
old address info with the new address info. I am having
some difficutly in creating the update query and labels
from it. Any assistance would be appreciated greatly.
Thanks.

Denny French
 
Creata a query for you rold table. Set this to an update query. In the QBE
window add your new table. If you set the relationships you should see a
line connecting the name field of the two tables, if not then drag the name
field from your old table to the name field of the new table. Include the
name and address fields into your query. In the update to row for the
address type in [NameOfNewTable].[NameOfAddressField], leave the row for the
name blank. In the where row of the name column type in
[NameOfNewTable].[NameOfNameField]. Run your queyr and you are done.

Kelvin
 
I have two tables in an address database. Each table
contains fields for a persons name and address. One
table contains updated address information while the
other contains old address info. I need to update the
old address info with the new address info. I am having
some difficutly in creating the update query and labels
from it. Any assistance would be appreciated greatly.
Thanks.

Denny French

Does either table have a Primary Key? Or is there some other way you
can uniquely and unambiguously identify each record (note that I have
two friends named Fred Brown, father and son, who until recently lived
at the same address)? If you have six people named John Jones, how
will you be able to tell which one of them has updated their address?

If you have such a unique field, create an Update query joining the
two tables by that ID; update the target table's Address field to

[Sourcetable].[Address]

using your own table and field names of course.

If you don't have any unique identifier for a record... then neither
Access nor any other tool I know can help you; it's going to be
impossible even for a human to apply the correct new address to "John
Jones" if they can't tell which of the six you mean!
 
Back
Top