Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

dublicate report

 
   Database Forums (Home) -> Visual Basic -> DAO RSS
Next:  SQL query match any 10 columns  
Author Message
Tammie

External


Since: Jun 26, 2006
Posts: 1



(Msg. 1) Posted: Thu Dec 07, 2006 5:02 pm
Post subject: dublicate report
Archived from groups: microsoft>public>vb>database>dao (more info?)

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 
Back to top
Login to vote
JP Bless

External


Since: Oct 22, 2005
Posts: 36



(Msg. 2) Posted: Fri Dec 08, 2006 12:15 pm
Post subject: Re: dublicate report [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
strange! vb6+access2002 - I have a mdb called treesy.mdb.There is a table,named transcipt with three fields:serial_no, eng,sound serial_no:1-10 (10 numbers) eng: 1.The movie has been on for 15 minutes, madam.@ 2.Oh, my god!@ It's 7:45 now!@ 3.Is Helen coming?@ It¡¯s 6:50 now.@..

Authentication Error??? - Ok so heres the code.. for some reason I kept getting the no permissions message, so I attempted to add the access workgroup file. Now I get the "Authentication Failed" message. This is a secure database. HELP.. I know I'm writing (adding) som...

Database Access Crashes on Windows 2003 Terminal Server - I have been running a Microsoft Access 97 application on Windows 2003 Terminal Server for almost a year now, with no problems. About two weeks ago, I started to get the following errors in my event log: Application Error; EventID: 1000 Faulting..

Software Engineers required for USA - Dear Sir, Kraftware Inc. Software Engineers required for USA We are a leading software consulting company based in Nebraska (Omaha) Growing in business for the past 9 yrs. We are currently Experiencing Growth and we are Hiring Software Engineers for..

Clipboard content to Access field - Hello: How can I paste a bitmap image in clipboard to an Access field using VB? Thank you in advance.
   Database Forums (Home) -> Visual Basic -> DAO All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]