A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Create a duplicate record.



 
 
Thread Tools Display Modes
  #1  
Old April 5th, 2006, 03:33 PM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default 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  
Old April 5th, 2006, 09:04 PM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default 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  
Old April 5th, 2006, 09:34 PM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default 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  
Old April 5th, 2006, 10:13 PM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 08:13 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.