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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to find a way to copy data

Status
Not open for further replies.

kklegman

MIS
Nov 14, 2003
14
0
0
US
I have an access 97 database used to input info for quotes. What i would like to do is pull up a completed quote in the input form and if possible copy that "quote" as another one for revision. Have seen where you can copy objects and table but not the actual info that is input on one form. Not been able to find anything that will address that. Not sure if this is the right forum for posting. Thanks in advance for any help!
 
Hi

I cannot give a definitive answer without more information on your application, but at its simplist if all of the quote information is held in a single table all you need is:

A question to determine the new QuoteId (unless this is an autonumber, in which case Access will provide this)

An insert query to make a new row in your quotation table based on the current row

This is the broad principle, it may need to be 'tidied up' if for example the data is held in more than one table etc

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Try this:

Private Sub Command234_Click()

Dim db As DAO.Database, rst As DAO.Recordset

'Copy record
Set db = CurrentDb
Set rst = db.OpenRecordset("tbl_one_copy")
rst.AddNew

rst!field1 = Me!field1
rst!field2 = Me!field2
rst!field3 = Me!field3
rst!field4 = Me!field4

rst.Update
rst.Close
db.Close

End Sub

Hope that helps,

Jerome Benton
JERPAT Web Designs
GOD Is Good All The Time!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top