I have a report and in the detail section, I have an unbound txtTotalCost with a ControlSource of =[txtQTY]*[txtUnitPrice]. In the Group Footer, I have another unbound txtSheetTotal with a ControlSource of =Sum([txtTotalCost]).
I get an "Enter Parameter" message when I go to Print Preview for txtTotalCost. If I hit OK, the report opens with no value in the txtSheetTotal. If I enter a number at the parameter prompt, then I get Error "The Microsoft Jet database engine could not execute the SQL statement because it contains a field that has an invalid data type" (Error 3169). My data type is set to currency but the same happens no matter what.
My only guess is that it is trying to Sum txtTotalCost before it has been completed. I get #Error if I move txtSheetTotal to the Page Header or Footer.
If I change txtSheetTotal ControlSource to =Count([txtTotalCost]), it still asks me to enter a value, but then it properly counts the number of records, regardless of the number I entered.
I think I remember something about not being able to use Sum sometimes in a report. But I use this exact same setup in other reports and it works fine.
If I remove the equation from txtSheetTotal altogether, the form opens with no prompts.
Thank you for your help. Sean.
I get an "Enter Parameter" message when I go to Print Preview for txtTotalCost. If I hit OK, the report opens with no value in the txtSheetTotal. If I enter a number at the parameter prompt, then I get Error "The Microsoft Jet database engine could not execute the SQL statement because it contains a field that has an invalid data type" (Error 3169). My data type is set to currency but the same happens no matter what.
My only guess is that it is trying to Sum txtTotalCost before it has been completed. I get #Error if I move txtSheetTotal to the Page Header or Footer.
If I change txtSheetTotal ControlSource to =Count([txtTotalCost]), it still asks me to enter a value, but then it properly counts the number of records, regardless of the number I entered.
I think I remember something about not being able to use Sum sometimes in a report. But I use this exact same setup in other reports and it works fine.
If I remove the equation from txtSheetTotal altogether, the form opens with no prompts.
Thank you for your help. Sean.