I have a table calls "Medications" and it has three colums (Medication_Name, Concentration, Units) then I have another table name Main Table, which grabs the value from the Form and put it in MainTable under Medication_Name, Concentration and Units.
On the form I have a combo box for Mecdication, When User picks MEDICATION the concentration and Units text box get populated by it self. I have a small query for it.
Expand|Select|Wrap|Line Numbers
- SELECT Medications.Concentration, Medications.Units
- FROM Medications
- WHERE (((Medications.Medication_Name)=[Forms]![frmMain]![Medication_Name]));
In code thats what I have to fetch the value from the Medications Table and get Concentration and Units Textbox populated, but the problem is the value from Concentration and Units are not getting enterd in the MainTable.
The control source for Concentration is
Expand|Select|Wrap|Line Numbers
- =DLookUp("Concentration","medquery")
Expand|Select|Wrap|Line Numbers
- =DLookUp("Units","medquery")
Expand|Select|Wrap|Line Numbers
- Private Sub Medication_Name_Change()
- 'DoCmd.OpenQuery "medquery"
- Me!Concentration.Requery
- End Sub
Thx.