Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Urgent Help Needed: 2 tables need to be appended

Status
Not open for further replies.

Flight15

Technical User
May 17, 2006
4
CA
Hi,

I'm not an expert at MS Access at all. But I need some coding or help because I'm in a bind right now.

Here's the situation: I have a Product Details table, and I want to append another table to this table. But the Product Details table has a ProductID that is a 4 digit number while the other table starts from 1.

For example:
--Product Details table
ProductID
5000
5001, etc

--New Table that will be appended into Product Details table
ProductID
1
2
3, etc

Both tables have the same data types and fields. How would I go about doing this?

This is Really Urgent.

Thanks
 
I forgot something.

The ID for the new table when appended into the Product Details table should start with a 4 digit ID as well.

For example: If the last record in the Product Details table was

Product ID Product Name
5551 Shoes

The first entry in the other table should be Product ID 5552.

Thanks.
 
You can create an append query and use
NewID: [ProductID] + DMax("ProductID","[Product Details]")
to append to the target table.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top