Copy Existing Fields to New Records

lklp

Registered User.
Local time
Today, 16:32
Joined
Aug 18, 2006
Messages
17
I have a database and I wish to be able to copy 10 out of about 20 fields into a new record automatically using a command button on a form. Similar to the way the Duplicate button or the Create New button would work but only with these selected fields. None of the fields I wish to duplicate are the primary key. The primary key is an AutoNumber field. After clicking the Save button, the primary key would increment one to confirm the save record.

Any help or suggestion would be appreciated!

Thanks!
 
where would you like to copy them to and from? did you just want to copy them from one form to another? what is the reason for copying?
 
Here is a sample of the fields on this form (see below).

Ideally, I would like to have a Duplicate or Create New button that would copy the RED fields to a new order. That way the user don't have to re-enter the same information all over again. Hope this make sense, let me know if you need more clarification.


OrderNo
Advertiser Name
Advertiser Address
Advertiser City
Advertiser State
Advertiser Zip Code
Advertiser Phone Number
Advertiser Fax Number

Order Quantity
Order Date
Order Quantity
Order Description


Thanks again!
 
Last edited:
you should do a search and read up on normalisation.

im not sure about the background of your db but from what i can see your 'advertiser details' should not be stored in the same table as your orders.

you should have an orders table with

OrderNo
Advertiser ID
Order Quantity
Order Date
Order Description

which links to a table about advertisers

Advertiser ID
Advertiser Name
Advertiser Address
Advertiser City
Advertiser State
Advertiser Zip Code
Advertiser Phone Number
Advertiser Fax Number

in your form you can have the foreign key from another table (for example the advertiser ID from the Orders table) and the rest of the information will auto fill.

hope this helps
 

Users who are viewing this thread

Back
Top Bottom