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!

Is this possible??? Creating duplicates of records....

Status
Not open for further replies.

stickers

Technical User
Nov 25, 2002
82
GB

I would like to use VBA to do the following when a button is clicked, but I don't know if it's possible. I have two tables which both have forms for data entry. The tables hold information on the details (dimensions, which department etc.) of a room (tblRooms), and its contents in terms of furniture respectively(tblContents).

There are 'default' rooms, which have a number of records in the contents table to show default lists of furniture items. What I want to be able to do is create a new record in tblRooms, which is identical to one of the default rooms (RoomName, e.g. DefaultOffice), but would have RoomName, e.g. DefaultOffice2. But I also need to copy all the records relating to DefaultOffice, and create identical new records relating to DefaultOffice2.

Is that understandable and is it possible???

Thanks,

Sarah
 
Hi

Yes its possible, assuming your table has a prime key (and / or other indices declared a s unique) you just need to ensure you put a unique value in the appropriate column(s) Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top