We have records with MV fields and when displayed the MV fields are broken up into 3 separate tables. Table_1 contains general info, table_2, payment info and table 3, Financial info.
The latest entry is always in row 1, so the most recent information is readily available. When adding a new row, the user positions the cursor on row 1 and presses the INSERT key. The information in row 1 is automatically moved to row 2, row 2 to row 3, etc.
The problem I have is that the information in table_2 and table_3 remains. The user must go to each table and press the INSERT key to allow for the new information.
Table 1 starts the information rolling, you do not have information for table_2 or table_3 unless you have information in table_1.
I wish to programmatically perform this corresponding function in table_2 and table_3 whenever the user presses the INSERT or DELETE key and at the same time, disable the use of the DELETE and INSERT key in table_2 and table_3.
It appears that INSERTROW might be the command to use but not 100% sure. Also, how does one disable a particular key?
Any ideas, suggestions, etc., are greatly appreciated.
Thanks
Andy
Andy
Use Send_message INSERT to insert rows in table 2 and 3.
To disable Insert and Delete keys, protect the table.
This is done via the Properties, click the More button and set the Protected check box to on.
This should not be confused with the Protected check box against each column , which enables/disables entry in the column.
Best of luck
Colin
Andy ..
I use a method similar to Colin's as follows:
Include 3 buttons at Table 1 (the controlling table), Add, Delete, Change.
For the Add button, I get the location to be inserted (in your case, always the head of the table) and spawn a dialog-box with non-database bound controls. I find it easier to check the data thare than inside a table). If the user enters data and save/exits the dialog, I send the INSERT to the table, repopulate the table and send an INSERT to the subsidiary tables.
For the Delete button, I prompt with a MSG thing to confirm and then send a DELETE to the tables
For the Change button, I load the dialog with the existing data to allow for modifications. I have also hooked a double-click event there to allow for direct modification.
DB_TABLES are a little unwieldy to do conditional dependencies in. That's why I use dialog boxes.
To get where you are, etc. in a table, get the SELPOS property to get row & column. Decompose the table into an array in INTERNAL format (it saves a bunch of ICONV/OCONV code).
HTH
Don Miller
C3 Inc.
Thanks for your help. I'll be working on it today.
Thanks for your help. I'll be working on it today.