I have a form with 2 fields that are dependent on the combination of values in 2 other fields. I would like to update the fields using a DLookup or SQL Select query. Details as follows:
Variable Field 1: Size
Variable Field 2: Value
Field 1 to update: Elec
Field 2 to update: Tot
For example:
If Size = C and Value = 1.10, Elec = 14 and Tot = 12
If Size = C and Value = 2.00, Elec = 19 and Tot = 13
If Size = B and Value = 2.00, Elec = 10 and Tot = 12
The Size field is selected first. I have an If-Then-Else code related to the After_Update of the Size field, which updates two other fields not listed here.
The Value field is an entered value depending on the user's whim of the moment. I would like to set something on the After_Update of the Value field that would update the Elec and Tot fields from a table containing Size, Value, Elec, and Tot fields.
Since there are 180 or so possible combinations for the Elec and Tot fields, I don't want to write and if-then-else for the Value field to update the Elec and Tot fields.
I'm out of ideas and running low on sleep. Any good ideas would be greatly appreciated!!!
Variable Field 1: Size
Variable Field 2: Value
Field 1 to update: Elec
Field 2 to update: Tot
For example:
If Size = C and Value = 1.10, Elec = 14 and Tot = 12
If Size = C and Value = 2.00, Elec = 19 and Tot = 13
If Size = B and Value = 2.00, Elec = 10 and Tot = 12
The Size field is selected first. I have an If-Then-Else code related to the After_Update of the Size field, which updates two other fields not listed here.
The Value field is an entered value depending on the user's whim of the moment. I would like to set something on the After_Update of the Value field that would update the Elec and Tot fields from a table containing Size, Value, Elec, and Tot fields.
Since there are 180 or so possible combinations for the Elec and Tot fields, I don't want to write and if-then-else for the Value field to update the Elec and Tot fields.
I'm out of ideas and running low on sleep. Any good ideas would be greatly appreciated!!!