Copying data from current record into a new record using a command button

S

Scott

I need to copying all data from current record into a new record using a
command button in an input form. Then the user can modify one or two fields
to speed up the data entry. However, the new record is not allowed to be
save if nothing is changed to avoid duplicate record. Can someone advise
how to accompany it.

Thanks,

Scott
 
A

Allen Browne

Here is the code to carry over the data from the last record:
http://allenbrowne.com/ser-24.html

For your second requirement (can't save unless something is entered), you
would need to use the BeforeUpdate event of the form to compare the fields
to the fields from the previous record. That would probably mean saving the
ID of the previous record in a module level variable, and OpenRecordset on
just that one record so you can compare all fields.

However, you may not need to do that: the code suggested in the link above
doesn't drop in all the values until the user starts entering something
(i.e. it uses Form_BeforeInsert), so the likelihood of the data being there
for no purpose is reduced.
 

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