Moving records between files
Ken Goff
macessen at accountmaster.com
Thu Apr 17 08:34:14 PDT 2008
On Apr 16, 2008, at 12:27 PM, henry lowenstein wrote:
>
> I use Pan daily and have done so for many years, but have never
> figured out the
> following situation.
> I have a data file A with many hundreds of records and I now want
> to transfer a group of
> twenty records from data file B, which also has many hundreds of
> records, into file A.
> I would like to select the records in file B, copy them and paste
> them into a special
> point within File A.
> Yes, I can do them one at a time or I can append them to the end of
> file A but that takes
> time and I hope there is an easier way.
> Pan probably has a dirt simple solution, but I’m not that computer
> literate and would
> appreciate help with this.
Since you need to place these records into a location somewhere other
than the bottom of the list in file A, a simple Select records for
export in file B and then OpenFile/Append approach will not give you
the results you want.
Assuming that both database A and B are identical in structure and
only differ in data content, It would be pretty easy to write a loop
procedure using CopyRecord and PasteRecord to do this.
Before running this procedure:
1) Open File B and select those records to transfer
2) Open File A and make the current record at the bottom of the
location for the insertion of records from File B (PasteRecord
inserts above the current record)
// Loop procedure to be located in File A
Local theNumber
OpenFile "B"
theNumber= info("Selected")
LastRecord
CopyRecord
OpenFile "A"
PasteRecord
Loop
OpenFile "B"
UpRecord
CopyRecord
OpenFile "A"
PasteRecord
Until theNumber -1
OpenFile "A"
-Ken Goff
AccountMaster / MacEssentials
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://provue.com/pipermail/qna/attachments/20080417/a1a0606d/attachment.html
More information about the Qna
mailing list