Creating Copy of a Record

kedarj

Registered User.
Local time
Today, 02:27
Joined
Sep 7, 2005
Messages
58
Hi,
I have a Edit Form, where users edit the customer information. I want to add a Button which creates another copy of the same record in the table.
How Can I achieve that? any suggestions?
Regards
-KJ
 
kedarj said:
Hi,
I have a Edit Form, where users edit the customer information. I want to add a Button which creates another copy of the same record in the table.
How Can I achieve that? any suggestions?
Regards
-KJ

You can use the following to carry a record forward. Simply insert the appropriate field values


'Carry values forward
Me!txtMarkets.DefaultValue = """" & Me!txtMarkets.Value & """"
Me![txtWholesale Date].DefaultValue = """" & Me![txtWholesale Date].Value & """"


DoCmd.RunCommand acCmdRecordsGoToNew
 
Can I add a Copy Button on the form and put the code on the ON-CLICK event?
thanks
KJ
 
kedarj said:
Can I add a Copy Button on the form and put the code on the ON-CLICK event?
thanks
KJ

You sure can
 
I wonder if someone could help me with this a bit more. I have been trying to apply this to a database and whilst it adds a new record, I have found that it then sets that as the default. I have applied the code to a button On Click. I have another button that does add new record. What I want to achive is if I press the add new button then all fields in the new record are blank. If I press the Add Copy button then then it copies those fields that I have filled in into the next record.

Hopefully that all makes sense!
 

Users who are viewing this thread

Back
Top Bottom