Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

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, 04: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, 09: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

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