B
Beetle
I have a continuous form with an unbound text box that has a DSum function as
it's control source. It is used to display the sum of a field in a query. It
works fine except that the last line of my form (the one for a new record)
displays #Error in this text box. My DSum function is;
= DSum("SumOfFootprint", "qryBoxTotals", "BinID = " & [BinID])
I've tried assigning it to the text box control source through code;
Me.txtFootPrintSum.ControlSource = DSum("SumOfFootprint", "Query1", "BinID =
" & Me![BinID])
but then I get the #Name error in the text box. I've also tried adding nz to
my DSum but that doesn't make any difference (although I'm sure if I was
placing correctly in the DSum or not)
Maybe I need a statement like;
If Not Me.NewRecord Then... but I'm not sure.
Any suggestions would be appreciated. Thanks
it's control source. It is used to display the sum of a field in a query. It
works fine except that the last line of my form (the one for a new record)
displays #Error in this text box. My DSum function is;
= DSum("SumOfFootprint", "qryBoxTotals", "BinID = " & [BinID])
I've tried assigning it to the text box control source through code;
Me.txtFootPrintSum.ControlSource = DSum("SumOfFootprint", "Query1", "BinID =
" & Me![BinID])
but then I get the #Name error in the text box. I've also tried adding nz to
my DSum but that doesn't make any difference (although I'm sure if I was
placing correctly in the DSum or not)
Maybe I need a statement like;
If Not Me.NewRecord Then... but I'm not sure.
Any suggestions would be appreciated. Thanks