Lookup tables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am really sorry, I know this is basic, but I just cannot work out how to do
it! I am trying to produce a databse of patients and their medications and
dosages. I have twotables a main data table, and a table of medications with
the possible dosages.

I want to produce a lookup table that gives me the possible doses for a drug
that I enter in the colum before and I cannot figure it out at all! Can
anyone help?
 
Doc,
I'll assume you have a subform that allows multiple Medications and Dosages to be
associated with each patient.

Use a combo box to select a Medication, and another to select the Dosage. (can be done
with one combo, but we'll use two)

Given tblMedications:
Medication Dosage
Lisinopril 10MG
Lisinporil 20MG
Prilosec 40MG etc...
Use your tblMedications Medications field as the RowSource for the cboMedications, and
Dosage and Medication for cboDosage.
The cboMedications should be bound (ControlSource) to the Medication field in your
table, and cboDosage should be bound to field Dosage.
Select any listed medication in cboMedications, use the AfterUpdate event of
cboMedications to Requery cboDosage, then select the proper dosage from cboDosage.
(cboDosage will only show appropriate dosages for that med)
cboDosage should have 2 columns (Dosage, and Medication (hidden)), and field Medication
should be filtered with this criteria...
(use your own control and object names)

= Forms!frmYourMainFormName!frmYourSubName.Form!cboMedication

That says... Only show Dosages where the Medication is equal to what I selected in
cboMedications.
 
Back
Top