G
Guest
I have a form that has the following fields of interrest: "Model_Year",
"Tonnage" and "Rate".
Model_Year is a number based off a previous form field entry frm_Quote_Info
i.e. "2005", Tonnage is entered on the current form frm_Cost_Sheet and I want
Rate automatically entered on the current form frm_Cost_Sheet based on
Model_Year and Tonnage.
I have a reference table tbl_Tonnage_Rate that has the fields Model_Year,
Tonnage_Start, Tonnage_Finish and Rate.
Sample entries:
Model Yr Mach Size Mach Size Rate
Start Finish
2004 501 700 $61.23
2004 701 1000 $90.33
2005 50 80 $28.03
2005 85 140 $29.40
2005 150 200 $30.78
2005 210 300 $39.38
2005 310 390 $43.68
2005 400 500 $54.08
2005 501 700 $62.45
2005 701 1000 $92.13
2006 50 80 $28.59
2006 85 140 $29.99
This is what I am trying to do, when the Tonnage is entered VB looks at the
Model_Year in the form to match to the Model_Year in the reference table
tbl_Tonnage_Rate and then look at the Tonnage entered to see where it falls
between the Mach Size Start and Finish and then return the Rate Value into
the form in field Rate.
It seems so easy in thought but to write code I am lost how to make 2
criterias before the "Then" section of an If-Then statement.
Thanks!!
Stacey
"Tonnage" and "Rate".
Model_Year is a number based off a previous form field entry frm_Quote_Info
i.e. "2005", Tonnage is entered on the current form frm_Cost_Sheet and I want
Rate automatically entered on the current form frm_Cost_Sheet based on
Model_Year and Tonnage.
I have a reference table tbl_Tonnage_Rate that has the fields Model_Year,
Tonnage_Start, Tonnage_Finish and Rate.
Sample entries:
Model Yr Mach Size Mach Size Rate
Start Finish
2004 501 700 $61.23
2004 701 1000 $90.33
2005 50 80 $28.03
2005 85 140 $29.40
2005 150 200 $30.78
2005 210 300 $39.38
2005 310 390 $43.68
2005 400 500 $54.08
2005 501 700 $62.45
2005 701 1000 $92.13
2006 50 80 $28.59
2006 85 140 $29.99
This is what I am trying to do, when the Tonnage is entered VB looks at the
Model_Year in the form to match to the Model_Year in the reference table
tbl_Tonnage_Rate and then look at the Tonnage entered to see where it falls
between the Mach Size Start and Finish and then return the Rate Value into
the form in field Rate.
It seems so easy in thought but to write code I am lost how to make 2
criterias before the "Then" section of an If-Then statement.
Thanks!!
Stacey