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???
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.
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("<i>table name</i>"<br>with recs<br> .addnew<br> !<i>field name</i>=<i>value</i><br> .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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.