Dear friends,
I use Delphi 6 and Ms Access 2000. I'm working a program for keeping medical record for patients.
I have two tables :
Table "Drugs", fileds : drug_id (Primary Key), amount
Table "Patient_Drugs", fields : patient_id(PK), drug_id (FK), usage
In my form "Patient Drugs", I display this two tables in each DBGrid (DBGrid1 : displaying table "Drugs" and DBGrid2 : table "Patient_Drugs").
DBGrid1 has no DBNavigator, so users can't modify data (read only).
DBGrid2 use a DBNavigator, so users can add more data.
I want only the new data that input into the DBGrid2, especially field "usage" can automatically subtract the DBGrid1 field "amount".
(I mean the database has been updated and displayed in DBGrid1).
How could do this update?
Please help me.
Thank you all,
Hansen