Home » Developer & Programmer » Forms » Problem in creating Duplicate reocrd
Problem in creating Duplicate reocrd [message #236441] Thu, 10 May 2007 00:28 Go to next message
kamran.it
Messages: 265
Registered: September 2005
Location: Karachi
Senior Member
Hi all

I am facing problem in creating duplicate record.

I have 4 table/blocks

1. costmain - single record block.
2. yarncost - multi record block.
3. bottomcost - single record block.
4. sizecost - multi record block.

Now please tell me in this situation what is the best way to create duplicate record.


Re: Problem in creating Duplicate reocrd [message #236451 is a reply to message #236441] Thu, 10 May 2007 00:55 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Using the DUPLICATE_RECORD built-in.

It doesn't matter how many records you have in a block - it is always only one record to be duplicated.
Re: Problem in creating Duplicate reocrd [message #236469 is a reply to message #236451] Thu, 10 May 2007 01:16 Go to previous messageGo to next message
kamran.it
Messages: 265
Registered: September 2005
Location: Karachi
Senior Member
I have tried this but it brings only one record from costmain table/block.

[Updated on: Thu, 10 May 2007 01:17]

Report message to a moderator

Re: Problem in creating Duplicate reocrd [message #236700 is a reply to message #236469] Thu, 10 May 2007 11:47 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It means that the current block is 'costman'. If you want to duplicate record in another block, go there and repeat the procedure. For example:
go_block('first_block');
  last_record;
  duplicate_record;

go_block('second_block');
  last_record;
  duplicate_record;

etc.
Re: Problem in creating Duplicate reocrd [message #237977 is a reply to message #236700] Wed, 16 May 2007 04:22 Go to previous messageGo to next message
kamran.it
Messages: 265
Registered: September 2005
Location: Karachi
Senior Member

go_block ('costmain'); --single row
create_record;
duplicate_record;
go_block ('yarncost'); -- multiple rows
duplicate_record;
go_block ('bottomcost'); -- multiple rows
duplicate_record;
go_block('sizecost'); -- single row
duplicate_record;

error shows:

FRM-41803 No Previous record to copy value from.

Re: Problem in creating Duplicate reocrd [message #238085 is a reply to message #237977] Wed, 16 May 2007 11:31 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It says that there's no previous record to copy value from, i.e. you have to have at least one record in a block in order to be able to copy its value(s) into a newly created record.
Re: Problem in creating Duplicate reocrd [message #238173 is a reply to message #238085] Thu, 17 May 2007 00:07 Go to previous message
kamran.it
Messages: 265
Registered: September 2005
Location: Karachi
Senior Member
Yea I know and I have 100 records in my tables (master/details)
Previous Topic: Forms6i in char.mode on AIX 64 bit (64-bit), will this work?
Next Topic: Write some letters in a list box and receive a list
Goto Forum:
  


Current Time: Fri Sep 27 00:16:15 CDT 2024