I have a temp table, tblTempInv with 43 fields. This table is created each morning and inventory is added to it or subtracted from it numerous times each day. I need to be able to make those additions and subtractions in code to increase the security of the numbers, and prevent editing of the data after the drug and volume has been verified as that which was administered to the patient. The field names are mostly a concatenation of the DrugID (lngDrugID) and either a "V" or an "O" signifying full or open vials. When the user accepts the drug and dosage, I want an entry to be made which will change only the data in the 1 or two columns affected, but will bring the other numbers down from the previous record into the new record so the new record reflects the total inventory of all the drugs after the entry. I am having difficulty in referring to each of these columns in the old and new records and determining how to make the change(s) in the correct field(s). Should I use an array? How could this be done the most efficiently?
Thanks
Bob
Thanks
Bob