teufel
Posts: 13
|
| Posted: 08/05/2004, 4:15 PM |
|
I have some fields in a record form which shall be inserted into table 1 (or updated).
Some other fields will be inserted into table 2 (or also updated), related to table 1 by a foreign key.
Since a record data source must be only from one table, I setup INSERT ALLOWED and UPDATE ALLOWED to FALSE. I also did not create any CUSTOM SQL, since my SQL shall insert or update 2 tables and not only one.
So I created 1 button which is responsible for the two insertions, and another button which is responsible for the two updates (and I do that at the ONCLICK event of the buttons).
It is working just fine.
Now I needed to test the form for if it is in EDIT MODE or in ADD MODE, but since I did not specified that the INSERT and
UPDATE operations are allowed, apparently this property is never setup, since I am not being able to distinguish when the form is in EDIT MODE or in ADD MODE.
So my questions:
1) If I have fields from more than 1 table in my record form, and must then insert/update more than 1 table at a time, which strategy should I use?
2) The way I managed to do this was to inform that no inserts/updates were allowed, and by creating common buttons to which I associate custom code for inserting/updating when the button is pressed. Is this the cause why EDIT MODE property is not being setup?
_________________
--teufel |
 |
 |
|