Copy portion of a record into a new record

  • Thread starter Thread starter Rick
  • Start date Start date
R

Rick

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
 
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 - 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.
 
Back
Top