automatically insert data

Manic_Rach

Registered User.
Local time
Today, 05:53
Joined
May 23, 2011
Messages
32
hey guys, not sure if there's a simple answer to this.

I have a table storing information on materials, so material codes, descriptions, cost per unit etc.

I have a form relating to this table. I wanted to know, if I select a certain material code in one field, can the cost per unit for that material code be automatically inserted into the cost per unit field?
 
Yes, it can be done if you have a cost in the table where the material code is.
 
yeah, they're in the table together. how is it done?
 
When you have ComboBox or TextBox with the Material_Code, you must add "after_update" this:

Me!Cost_Per_Unit = Me!CB_Material_Code.Column(1)

Cost_Per_Unit is the field which will be updated automatically
CB_material_Code is combobox or textbox where you have the material code
Column(nr) is column in the basic table, nr is number of column-1, the first column is 0
 

Users who are viewing this thread

Back
Top Bottom