Hi all
,
been on this bit of coding all morning and have had little success. I am working on a form and within that form i am trying to pull through the value of a field from the previous record into the present one and do a calculation on it. I have played around a bit and have had it working well sort of.
The code is as follows:
Me![name of field the calculation will appear in] = DLookup("[name of field in previous form]", "[table name]", "[ID]=" & Forms![form name]![ID] - 1) + [field that is need for calculation]
The error message being displayed is:
Run-time error '3075':
Syntax error (missing operator) in query expression
'ID ='.
Any one have any ideas?
Cheers

been on this bit of coding all morning and have had little success. I am working on a form and within that form i am trying to pull through the value of a field from the previous record into the present one and do a calculation on it. I have played around a bit and have had it working well sort of.
The code is as follows:
Me![name of field the calculation will appear in] = DLookup("[name of field in previous form]", "[table name]", "[ID]=" & Forms![form name]![ID] - 1) + [field that is need for calculation]
The error message being displayed is:
Run-time error '3075':
Syntax error (missing operator) in query expression
'ID ='.
Any one have any ideas?
Cheers