Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Duplicating Information

Status
Not open for further replies.

ind

Programmer
Mar 9, 2000
121
US
I have a listbox listing all the jobs that have been created for my company. I want to be able to select a job and click a command button to duplicate that particular job. <br><br>How can I append all the information???
 
I am not quite sure what you want. Please add some more details.
 
You can create a duplicate copy of record in a data-entry form by creating a command button to duplicate a specific record. I want the user to be able to choose the record they want to duplicate by selecting it from a listbox. When the user chooses the job they want to duplicate they can then click the command button to duplicate the job. I want the frmJobs form to open to the copied record with the information of the job that was duplicated.<br><br>I hope this clears it up.
 
I am still a little puzzled, because in order for me to tell you what to do, I will need to know how you structured your tables.
 
The form with the listbox is unbound. The listbox shows the Job Number, Po Number, Description, Sale Price and Begin Date. I want the record duplicated by the Job Number and fill in all of the other information that is associated with that record according to the job number.
 
I do not know if this is what you want, but I will give it a try.<br><br>this is DAO.<br><br>dim db as dao.database<br>dim recs as dao.recordset<br>set db=currentdb()<br>set recs=db.openrecordset(&quot;<i>table name</i>&quot;)<br>with recs<br>&nbsp;&nbsp;.addnew<br>&nbsp;&nbsp;!<i>field name</i>=<i>value</i><br>&nbsp;&nbsp;.update<br>end with<br>recs.close<br>db.close<br><br>this piece of code inserts a new record into the table of your choice. You can expand this code with whatever functionality you want.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top