Need to add revised records as new...

T

TC2

I've created a simple contract management database. I'm using separate forms
for adding new records and editing existing records. I've set up the edit
form with a query as the record source. I can successfully populate the form
with table values for the records I wish to edit. However, I want to keep
all of the records and add the edited record as new. In other words, I'm
keeping a complete history of edits for each contract number.

My problem is, I can't figure out how to write the edited records as new
records...
 
U

UpRider

TC, this is a job for an INSERT query. An INSERT query will add a new row
to a table and let you specify the contents of each column as data from your
form. If your PK is a data field and not an autonumber, you will have to
insure uniqueness.

UpRider
 
T

TC2

Hi UpRider,

StrSQL = "INSERT INTO [Contract Info] (ContractNumber, CustomerName)
VALUES ('" & _
Forms![Contract Info Edit Form]![ContractNumber] & "', '" & _
Forms![Contract Info Edit Form]![CustomerName] & "');"

did the trick! Now I'm hard a work adding the rest of the fields!

Thank you for your post!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top