If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Create a duplicate record.
How do I create a new record in a query with related tables with all the data
from the selected record. Naturally I need a new entry in the key field. Thanks Joe |
#2
|
|||
|
|||
Create a duplicate record.
On Wed, 5 Apr 2006 07:33:02 -0700, Joe C
wrote: How do I create a new record in a query with related tables with all the data from the selected record. Naturally I need a new entry in the key field. Thanks Joe I'm not sure I understand the question. Are you trying to store data redundantly in the related tables? If so, DON'T! Please explain the nature of your tables, and their relationships; and what you're trying to accomplish with an example. John W. Vinson[MVP] |
#3
|
|||
|
|||
Create a duplicate record.
OK,
I have have orders table and an order details table. For reporting purposes I have a query to link them together. I want to create a new record that basically duplicates the selected record. From there I want to adjust fields like quantity. In essance, I want to cut down on a large amount of data entry by copying 90% of the data and adjusting the remaining 10%. I will be copying the record from the query. JC "John Vinson" wrote: On Wed, 5 Apr 2006 07:33:02 -0700, Joe C wrote: How do I create a new record in a query with related tables with all the data from the selected record. Naturally I need a new entry in the key field. Thanks Joe I'm not sure I understand the question. Are you trying to store data redundantly in the related tables? If so, DON'T! Please explain the nature of your tables, and their relationships; and what you're trying to accomplish with an example. John W. Vinson[MVP] |
#4
|
|||
|
|||
Create a duplicate record.
On Wed, 5 Apr 2006 13:34:02 -0700, Joe C
wrote: OK, I have have orders table and an order details table. For reporting purposes I have a query to link them together. I want to create a new record that basically duplicates the selected record. From there I want to adjust fields like quantity. In essance, I want to cut down on a large amount of data entry by copying 90% of the data and adjusting the remaining 10%. I will be copying the record from the query. Probably you'll want to run two Append queries, first for the Orders table and then the OrderDetails table. You can run the two queries from a Macro or (better) from VBA code. It's not clear how you will be selecting which record or records to duplicate though! Another approach is to use VBA code in a Form, if you want to navigate to a selected arbitrary record and duplicate it. You could open a Recordset based on the orders table, and add a new record, with code like Dim rs As DAO.Recordset Set rs = Me.RecordsetClone rs.AddNew rs!ThisField = Me!txtThis rs!ThatField = Me!txtThat etc for all the fields that you want dup'd rs.Update and then run an Append query to append the detail records. John W. Vinson[MVP] |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Create new record in sub form from main form | gazza | Using Forms | 0 | November 23rd, 2005 09:14 AM |
duplicate record button, excluding 1 field | sonfitz | General Discussion | 1 | November 17th, 2005 06:18 PM |
Create Report by using the current record in a form | ember | General Discussion | 4 | September 15th, 2005 02:48 PM |
Creating Records in tables automatically | peterg290935 | Using Forms | 8 | June 22nd, 2005 08:12 AM |
strategy for data entry in multiple tables | LAF | Using Forms | 18 | April 25th, 2005 04:04 AM |