Re: dublicate report

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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" <trojen4u@xxxxxxxxx> wrote in message
news:eYrAdQmGHHA.1080@xxxxxxxxxxxxxxxxxxxxxxx
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





.



Relevant Pages

  • Re: Have perl increment a number that shows up before a delimiter
    ... > introduce this on the command line and have the script increment this ... There is no newline if you have entered the filename on the command ...
    (comp.lang.perl)
  • Re: Counting, command button and programming in VB
    ... After that, left click anywhere in the Excel window, ... "Alan" wrote in message ... Sub Increment() ... command button which is the second one down on the right, ...
    (microsoft.public.excel.misc)
  • Re: looping questions
    ... You can remove the line with the increment. ... Perl's system operator wants a command to run, e.g., ... Backticks also want a command. ...
    (comp.lang.perl.misc)
  • Re: looping questions
    ... You can remove the line with the increment. ... Perl's system operator wants a command to run, e.g., ... Backticks also want a command. ...
    (comp.lang.perl.misc)