PC Review


Reply
Thread Tools Rate Thread

Copy portion of a record into a new record

 
 
Rick
Guest
Posts: n/a
 
      17th Sep 2003
Ok - Here's my situation:
I have a tabbed form with names we'll say are ---[Tab1],
[Tab2], [Tab3].
Now most of the fields in Tab's 1,2 & 3 are from a single
table.
Here's what I would like to do: On [Tab3] I would like to
create a modified Copy Record button. What do I mean by
modified? Normally when you Copy a record it copies all
of the fields associated with that record and makes a new
record with it, I don't want it to do that. I only need
to take values in certain fields and paste them into a new
record.
Here is one way I thought might work: Press a button that
would first create a New Record, then take only those
values from the last viewed record that I would want it to
take and have them populate their fields in the New Record.
I am not sure if that's the proper way to do it or if it
would even work.
Does anyone have any ideas or suggestions on how to go
about doing this? I'm a little unsure on how to properly
code this. It should probably be in a module and have a
button reference it, but I wouldn't know where to begin to
code that.

Thanks in advance,
Rick
 
Reply With Quote
 
 
 
 
John Vinson
Guest
Posts: n/a
 
      17th Sep 2003
On Wed, 17 Sep 2003 10:38:33 -0700, "Rick" <(E-Mail Removed)> wrote:

>Here's what I would like to do: On [Tab3] I would like to
>create a modified Copy Record button. What do I mean by
>modified? Normally when you Copy a record it copies all
>of the fields associated with that record and makes a new
>record with it, I don't want it to do that. I only need
>to take values in certain fields and paste them into a new
>record.


Have the button run a stored Append query appending the desired data.

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
 
Reply With Quote
 
John Vinson
Guest
Posts: n/a
 
      18th Sep 2003
On Thu, 18 Sep 2003 07:36:27 -0700, "Rick" <(E-Mail Removed)> wrote:

>John - How would the query know to append the current data
>into a new record? Should I use the filtered query that
>is used to open the form or create a new query to append
>the data just for that button?


You would need criteria on the Query (probably referencing a control
on the form) to select the appropriate records. Since I have no idea
how your form, tables, or queries are structured I obviously can't
tell you just what that query would be, but you can probably put
something like

=[Forms]![nameofyourform]![nameofacontrol]

on a criteria line to select records pertaining to the currently
displayed record on the form.

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy data from one record to a new record on a sub form =?Utf-8?B?RWNob3NwaWNl?= Microsoft Access Forms 4 19th Jul 2011 05:19 PM
Lookup values & copy record or move to new record if doesn't exist =?Utf-8?B?QW5uIGluIENB?= Microsoft Access Form Coding 0 4th Jun 2007 09:06 PM
How to copy Access record to make new record in a secure form? =?Utf-8?B?TWFydHk=?= Microsoft Access Forms 0 1st Sep 2005 03:16 PM
Form for portion of record =?Utf-8?B?TWFydGlu?= Microsoft Access Forms 1 9th Apr 2005 12:26 AM
Sub record not associated with main record when copy record button is used Ron V Microsoft Access Form Coding 0 21st May 2004 05:26 PM


Features
 

Advertising
 

Newsgroups
 


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