I am working on my first Access 2010 database and ran into the problem of editing the recordset returned from the query.
I have two tables: drugs and warehouse_table. In "drugs" I have the name of the drug. In another table, I have relevant information. For those drugs that are in the “Drugs” table, the pharmacist will manage their quantity and other relative values, such as the amount of each drug administered with a specific expiration date. The pharmacist can import the same drug information into store_stocK, but with a different expiration date.
Each row of data in "store_stock" is characterized by an active_object / strength / strength_type / form_dose. These four values must be the same in the string data in the “drug”. The pharmacist will be able to update curr_date, in_quant, out_quant_expiry_date and brand (from "store_stock") for existing row data and import new quantities of drugs that exist in the "drugs".
My request right now:
SELECT warehouse.active_subs,
warehouse.strength,
warehouse.strength_type,
warehouse.dosage_form,
warehouse.curr_date,
warehouse.in_quant,
warehouse.out_quant,
warehouse.expiry_date,
warehouse.available_stock,
warehouse.brand,
warehouse.ID
FROM drugs
RIGHT JOIN warehouse
ON ( drugs.active_substance = warehouse.active_subs )
AND ( drugs.strength = warehouse.strength )
AND ( drugs.strength_type = warehouse.strength_type )
AND ( drugs.dosage_form = warehouse.dosage_form )
WHERE ( ( ( warehouse.active_subs ) LIKE
"*" &
Forms!Pharmacy.form!pharmacy_warehouse_stock_Subform.form!warehouse_stock_act_sub & "*" )
AND ( ( warehouse.strength ) LIKE
"*" &
Forms!Pharmacy.form!pharmacy_warehouse_stock_Subform.form!warehouse_stock_strength & "*" )
AND ( ( warehouse.strength_type ) LIKE
"*" &
Forms!Pharmacy.form!pharmacy_warehouse_stock_Subform.form!warehouse_stock_strength_type & "*" )
AND ( ( warehouse.dosage_form ) LIKE
"*" &
Forms!Pharmacy.form!pharmacy_warehouse_stock_Subform.form!warehouse_stock_dosage_form & "*" ) );
Is there a way to make the result updated?
Thanks in advance for any suggestions!
Zinonas
zinon source
share