If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > Pls help - medical record program

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-05-03, 03:51
hansenbong hansenbong is offline
Registered User
 
Join Date: Feb 2003
Posts: 2
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,

Hansen
Reply With Quote
  #2 (permalink)  
Old 12-05-03, 08:36
sivaroo sivaroo is offline
Registered User
 
Join Date: Nov 2003
Posts: 76
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.
HTH
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On