
Originally Posted by
maximus
Find mdb attached. This contains the solution to your minimum stock level. I have made a re-order level in inventory table which is our minimum stock level. When a transaction makes the stock equal to or less than reorder level it is taged
What I have here us a simple mdb with a single table Employee and a Form1. Form1 has Two Combo boxes meant to select employee name.
In technique 1 we use the following code to populate our Text boxes:
=[Combo11].[column](1)
=[Combo11].[column](2)
=[Combo11].[column](3)
=[Combo11].[column](4)
Remember in the combo box property the no.of.columns should be equal to the fields that you want populate on the form.
the second Techique is Dlookup and the code as follows:
=IIf(IsNull(DLookUp("[Employee_id]","Employee","[Employee_id]=" & [Forms]![Form1]![Combo22])),"",DLookUp("[Employee_id]","Employee","[Employee_id]=" & [Forms]![Form1]![Combo22]))
=IIf(IsNull(DLookUp("[Employee_name]","Employee","[Employee_id]=" & [Forms]![Form1]![Combo22])),"",DLookUp("[Employee_name]","Employee","[Employee_id]=" & [Forms]![Form1]![Combo22]))
=IIf(IsNull(DLookUp("[Employee_Designation]","Employee","[Employee_id]=" & [Forms]![Form1]![Combo22])),"",DLookUp("[Employee_Designation]","Employee","[Employee_id]=" & [Forms]![Form1]![Combo22]))
=IIf(IsNull(DLookUp("[Employee_Phone_Number]","Employee","[Employee_id]=" & [Forms]![Form1]![Combo22])),"",DLookUp("[Employee_Phone_Number]","Employee","[Employee_id]=" & [Forms]![Form1]![Combo22]))
Remember default value of the combobox is set to 0 to prevent Error# being displayed.