Hello,
I have a Text box based on a form, called e.g. txtFinalValue.
I want the value that displays in this textbox, to depend on something though.
For example, if I have the following columns in a query, which the recordsource for the text box is based on:
ID Value1 SubValue1 Value2 SubValue2
1 90 12 NULL NULL
2 87 11 76 21
3 NULL NULL 95 32
The text box should always display the latest ValueX, with Value1 being the later than Value2. If e.g. Value1 is NULL, then it should take the next available ValueX.
Thus, when the record selector is on ID=1, then txtFinalValue should display 90(Value1).
If ID=2, then txtFinalValue=87(Value1).
If ID=3 then txtFinalValue=95(Value2).
How can I do this with as little VBA coding as possible(if any at all?)
Regards,
Jean
I have a Text box based on a form, called e.g. txtFinalValue.
I want the value that displays in this textbox, to depend on something though.
For example, if I have the following columns in a query, which the recordsource for the text box is based on:
ID Value1 SubValue1 Value2 SubValue2
1 90 12 NULL NULL
2 87 11 76 21
3 NULL NULL 95 32
The text box should always display the latest ValueX, with Value1 being the later than Value2. If e.g. Value1 is NULL, then it should take the next available ValueX.
Thus, when the record selector is on ID=1, then txtFinalValue should display 90(Value1).
If ID=2, then txtFinalValue=87(Value1).
If ID=3 then txtFinalValue=95(Value2).
How can I do this with as little VBA coding as possible(if any at all?)
Regards,
Jean