I have item 1 in a form control (called L1400xshadow),which then gets passed to fprm control L1400 totaling everything inthe column above. I have added item 2 to the first calculation and it now alsodoes a DLookup in a Query and adds that to the total. It works. Finally, the amount inL1400 gets pulled into another form using a DLookup like the second item.
1. =[L700x]+[L800x]+[L900x]+[L1000x]+[L1100x]+[L1200x]+NAsZ([L1301x])+NAsZ([L1308x])
2. =IIf(IsNull([Forms]![CloseForm].[SettlementPage2]),Null,DLookUp("[L1400x]","TSettlementPage2","[Page2ID]=Forms![CloseForm].[SettlementPage2]"))
But when I open the form to create a new record, it dropsdown into the following code:

'Update line 1400 on page 2 of the settlement statement. Dothis on timer as
'well as before update.
'
Function UpdatePage2Totals()

Page2$ ="FSettlementPage2"

IfIsNull(Forms(Page2$)("[L1400x]")) Or(Forms(Page2$)("[L1400x]") <>Forms(Page2$)("[L1400xShadow]")) Then
Forms(Page2$)("[L1400x]")= Forms(Page2$)("[L1400xShadow]")
End If
IfIsNull(Forms(Page2$)("[L1400y]")) Or(Forms(Page2$)("[L1400y]") <>Forms(Page2$)("[L1400yShadow]")) Then
Forms(Page2$)("[L1400y]") =Forms(Page2$)("[L1400yShadow]")
End If
End Function
As this code works reliably, I think it is referring to thenew calculation in L1400xshadow.
I also get a message Run-Time error “2447”: There is aninvalid use of the . (dot) or ! operator or invalid parentheses.



Any suggestions would be appreciated. Thanks.

On reflection, I am trying to DLookup a value in a record that cannot be created until after I open this form. Back to the drawing board.....