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 » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Duplicating Recordsets



 
 
Thread Tools Display Modes
  #1  
Old June 3rd, 2004, 11:02 PM
Van T. Dinh
external usenet poster
 
Posts: n/a
Default Duplicating Recordsets

AFAIK, Recordsets are just different "views" of data in the Tables so you
cannot modify data in the "views" without modifying data in the Tables.

Thus, the temp. Table is the correct solution.

--
HTH
Van T. Dinh
MVP (Access)


"Andy" wrote in message
...
I want to take data from a table, modify it and put it in
a report without changing the original table data.
OpenTable links the rst to the table data as does .clone.
OpenSnapshot locks the records for modification. I ended
up using a temp table, but this isn't very elegant. How
can I create a modifiable copy of a recordset independent
of the original?



  #2  
Old June 4th, 2004, 01:15 AM
Larry Daugherty
external usenet poster
 
Posts: n/a
Default Duplicating Recordsets

Hi Andy,

You didn't give us any idea of how much data, in terms of the number of
fields, you are changing. That information can make a difference ... You
can write some code to get done what you want but the cost/benefit ratio is
something you'd have to decide. If you've never done it before, I suggest
you try the following on at least one field:

In all cases, you'll create new field names in the QBE grid and follow them
with colons. If the change can be made with a fairly simple formula then
do something like: MyNewFieldResult: =(OldField1*3.14) . If there is a lot
of conditional code and complex calculation involved then write a function
procedure in the report module. and call it as follows; MyNewFieldResult:
=MyNewFunction(Field1). MyNewFunction will be written to return the correct
result.

The report must refer to your new field names rather than to the fields they
replace.

HTH
--
-Larry-
--

"Andy" wrote in message
...
I want to take data from a table, modify it and put it in
a report without changing the original table data.
OpenTable links the rst to the table data as does .clone.
OpenSnapshot locks the records for modification. I ended
up using a temp table, but this isn't very elegant. How
can I create a modifiable copy of a recordset independent
of the original?



  #3  
Old June 4th, 2004, 03:54 PM
Andy
external usenet poster
 
Posts: n/a
Default Duplicating Recordsets

I'm doing a 'what-if' scenario, so I don't want to change
my original table data. If all recordsets in Access are
linked to tables, I guess there's no choice but to use a
temp table. Thanks, Rosco.


-----Original Message-----
What kind of changes are you making. Can these

modifications be a calculation against fields in your
orginal table?
Rosco

----- Andy wrote: -----

I want to take data from a table, modify it and put

it in
a report without changing the original table data.
OpenTable links the rst to the table data as

does .clone.
OpenSnapshot locks the records for modification. I

ended
up using a temp table, but this isn't very elegant.

How
can I create a modifiable copy of a recordset

independent
of the original?

.

  #4  
Old June 4th, 2004, 04:11 PM
Andy
external usenet poster
 
Posts: n/a
Default Duplicating Recordsets

Thanks for your reply, Van. I think I get the picture.
Access is all table driven and a recordset is just a
subset of a table(s). I have a lot to learn. From now on,
temp tables it is !


-----Original Message-----
AFAIK, Recordsets are just different "views" of data in

the Tables so you
cannot modify data in the "views" without modifying data

in the Tables.

Thus, the temp. Table is the correct solution.

--
HTH
Van T. Dinh
MVP (Access)


"Andy" wrote in message
...
I want to take data from a table, modify it and put it

in
a report without changing the original table data.
OpenTable links the rst to the table data as

does .clone.
OpenSnapshot locks the records for modification. I

ended
up using a temp table, but this isn't very elegant. How
can I create a modifiable copy of a recordset

independent
of the original?



.

  #5  
Old June 4th, 2004, 04:25 PM
Andy
external usenet poster
 
Posts: n/a
Default Duplicating Recordsets

Hey, Larry, I was doing a 'what-if' scenario, so I didn't
really want to add more fields to the original table. A
temp table is the way to go, I guess.

You mentioned 'cost/benefit ratio' in your posting. Do
you know if Access has any measurements like machine
cycles, run time or bytes of code etc. that could be used
to compare code or write it more efficiently?

Thanks for your reply.


-----Original Message-----
Hi Andy,

You didn't give us any idea of how much data, in terms of

the number of
fields, you are changing. That information can make a

difference ... You
can write some code to get done what you want but the

cost/benefit ratio is
something you'd have to decide. If you've never done it

before, I suggest
you try the following on at least one field:

In all cases, you'll create new field names in the QBE

grid and follow them
with colons. If the change can be made with a fairly

simple formula then
do something like: MyNewFieldResult: =(OldField1*3.14) .

If there is a lot
of conditional code and complex calculation involved then

write a function
procedure in the report module. and call it as follows;

MyNewFieldResult:
=MyNewFunction(Field1). MyNewFunction will be written to

return the correct
result.

The report must refer to your new field names rather than

to the fields they
replace.

HTH
--
-Larry-
--

"Andy" wrote in message
...
I want to take data from a table, modify it and put it

in
a report without changing the original table data.
OpenTable links the rst to the table data as

does .clone.
OpenSnapshot locks the records for modification. I

ended
up using a temp table, but this isn't very elegant. How
can I create a modifiable copy of a recordset

independent
of the original?



.

 




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


All times are GMT +1. The time now is 04:53 PM.


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