This is two part process...
1. Which record to clone and insert
2. Assign record number (in increment of last record number)
Question is how do you assign record number (Auto Number or increment of top
record number 1?)
If AutoNumber... a simple insert query should do...
Dim itmX as listItem, sSQL as string
Set itmx = YourListView.SelectedItem
ssql = "INSERT INTO YourTable( Field1, Field2, Field3 ) " _
& "SELECT tbl_YourTable.Field1, YourTable.Field2, YourTable.Field3 FROM
YourTable " _
& "WHERE YourTable.RecordNumber =" & itmx.ColumnThatHoldsRecordNumber
Call YourDbConnection.Execute(sSQL)
set itmx = nothing
"Tammie" wrote in message
> Hi.
>
> I have a VB 6.0 small application. First the user can create new record
> or open existing record. I have a search form that asks the user for the
> report number or title of the record. then the record is listed on
> ListView which then can be selected to open report or record with command
> button.
>
> I would like to add one command button that can be able to duplicate the
> record and yet assign new record number.
>
> can anyone help me accomplish this? please?
>
> I am using access 2000 with dao recordset.
>
> thanks
>
>
>
>> Stay informed about: dublicate report