View Single Post
  #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?



.