Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2003

    Unanswered: Pls help - medical record program

    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,


  2. #2
    Join Date
    Nov 2003
    on dbgrid2(patient_drugs) update or delete you could use the grid1 column value +1 or -1. This will be effective for the user that adds the data on dbgrid2.

    If it s a multiuser program then you might be better off with updateing the amount on drugs table everytime a user add or delete row on patient_drugs.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts