code for insert,execute,delete records [message #313157] |
Thu, 10 April 2008 23:08  |
gemini5
Messages: 16 Registered: April 2008
|
Junior Member |
|
|
Hi,
I have a question here.I wanted to know if we can have buttons for inserting,executing and addition and deletion of records and these buttons should be common for all the data blocks on the form.
Like for eg:-I have a form that has 4 data blocks like project,proj_dev_cost,proj_requirement and products.there is a master detail relationship between project and proj_dev_cost.Now wat i want is buttons for addition,deletion,execution buttons common for all data blocks.is that possible?? and if yes can anyone please provide me the code for the buttons....I need it urgently....
|
|
|
|
|
|
|
|
Re: code for insert,execute,delete records [message #313259 is a reply to message #313157] |
Fri, 11 April 2008 04:51   |
gemini5
Messages: 16 Registered: April 2008
|
Junior Member |
|
|
okk..i will take care of the master-detail relationship.
but now wat i want to do is...if i place my cursor on any record of any block and press the delete button..that record should get deleted if it is a child...or else if it is the parent record that shud show an appropriate message...could you plzz give me the code for it..i have mentioned the data blocks that i am using in the first question....i tried delete_record..but again i need to put this in every data block separately...n i dont want to do that...kindly help me with this...thank you
|
|
|
|
|
|
|
Re: code for insert,execute,delete records [message #315538 is a reply to message #313904] |
Mon, 21 April 2008 20:25  |
 |
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
Have you solved your problem? Read the reference manual or online help concerning the 'on-delete' trigger.
In your 'when-button-pressed' trigger, test to find out where the cursor is currently placed, then use that information to determine the block to which you need to point and then use 'delete_record' to delete the record.
David
|
|
|