Hi,
Some time ago Jane helped me out with an Before record Added event to update one of tables and it read:-
update pilots set hours=hours+".$values["duration"]." where pilotid='".$values["pilotid"]."'
The problem I have is that if that vlaue is then edited it will always add it again as opposed to adjust it. does that make sense?
So basically, I would like in the first instance the value to be added but would like it to be adjustable through the before record added in the edit page. How would I allow adjustment both positive and negative once the edit has been completed?
Example:-
If I add a new reocrd and submit 3 for the duration, the pilots hours are then credited by 3.
If I want to then edit that record to read 2, I then submit that and the record then becomes 5 rather than amend it to 2
Should I use negative numbers to reduce the pilots hours amount?
Thanks,