Hi,
I tried searching the internet and tried a few examples, but still cannot get it working. Here is my problem! I have a continuous form that displays Tbl.fldA, Tbl.fldB, Tbl.fldC, Form.fldD. what I am trying to do, is put a calculated value into Form.fldD based on the information in fldA - C, i.e.
Form.fldD = (Tbl.fldA - Tbl.fldB) * Tbl.fldC
I put this into the Open Form event, but the value it calculates is based on the first record in the form and populates this value to all the other records on the form.
I then created a private Function within the form as follows:
Function MyTest(A as double, B as double, C as double) as double
MyTest = (A - B) * C
End Function
In the controlsource of Form.fldD I put the following expression:
=MyTest([Tbl.fldA]+[Tbl.fldB]+[Tbl.fldC])
It accepts the expression, but when I run the form #Name? appears in Form.fldD
I would like to do various are things with the records on the continuous form, such has hi-lite fields if fldD is less then Zero, etc
Please help... I am aware that in a continuous form you only have 1 current record, even if it is displaying 100's. but not all the records will have a zero value...
Thanks
Earl