Hi Aelfassi
I think I remember there was a property of the table (..Modified?) but I would not rely on it in any case for the following reason:
- if it's a MODIFIED line, you will need to read the corresponding record before modifying its values, therefore you will need to have a unik key in the table somewhere to find it...
- if it's an ADDED line, you will either have entered a value for this unik key, or you are using an AUTOID...
In any case, you have a value somewhere that allows you to search for the record...
Therefore, when you exit the line, you do a hreadseek for the record, and if you find it, it's an edit, if not it's an ADD...
THAT will also take care of the problems of:
- several users creating the same record at the same time (if you are NOT using autoIDs)
- one user DELETING a recordand another one trying to modify it afterward (the record will be reCreated)
Best regards
Fabrice Harari
WinDev, WebDev, WinDev Mobile consulting