Duplicate a record

I

Iram

Hello,
Is there an easy way to duplicate a record in a continuous form?
More yet, how would you write a query to duplicate the current record based.
I would suppose some time of Append Query right? If so how would you write
it? Please describe steps in an easy way to understand.

Thanks!
Iram
 
D

Daniel Hafdelin

Hello,
Is there an easy way to duplicate a record in a continuous form?
More yet, how would you write a query to duplicate the current record based.
I would suppose some time of Append Query right? If so how would you write
it? Please describe steps in an easy way to understand.

Thanks!
Iram

Hi Iram,

Yes, an append query would be the best way to go. Create a query that
we'll call my query. This query will contain the table that you are
using in the continuous form. We'll call this "MyQuery". Assuming that
you have an auto-id field for a unique identifer in the table that
you're using in the continuous forms, we'll call this field "ID". Now,
in the query, for the criteria for the "ID" field, place this [Forms]!
[YourFormName]![ID].

Next create a button in your sub-form and place something likc this in
its on click event.

CurrentDb.Execute "MyQuery"

This will duplicate the current record that you're on.

Dan
<a href="http://www.datagopher.net">Access Developer</a>
 

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