SUM function inside textbox on the bottom of the form return #Error

amorosik

Member
Local time
Today, 04:28
Joined
Apr 18, 2020
Messages
505
I have a continuous form created with Access In the record origin there is a query that connects ACCOUNTINGMOVEMENTSTES with ACCOUNTINGMOVEMENTSROW and returns as many rows as there are accounting movement lines included in the current selection
Type recordset of the Snapshot form but I also tried Dynaset

In the body of the form all the requested lines are correctly displayed, for each line there are some fields taken from the ACCOUNTINGMOVEMENTSTES table and then some fields taken from ACCOUNTINGMOVEMENTSROW , one of these is the TAXABLE field, name of textbox is txtTaxable

A txtTotTaxable textbox in inserted in the bottom of the form, and in the control source there is a formula =Sum([TAXABLE ])

When I start the form the txtTotTaxable textbox continues to display #Error, what could it depend on?

I'm comparing it with a similar form, DocTes and DocRow, which works exactly as expected, they seem identical apart from the tables from which they draw the data, but Documents works and Accounting doesn't want to know about it
 
maybe use DSum() as controlsource of your textbox:

=Val(DSum("Taxable","querySourceOfYourForm") & "")
 
maybe use DSum() as controlsource of your textbox:

=Val(DSum("Taxable","querySourceOfYourForm") & "")

Thanks for the suggestion
But I've already tried =Val(Dsum([TAXABLE];filter)&"")
Same #Error result in txtTotTaxable
What I really don't understand is why it works on the Documents form and it doesn't work on the Accounting form, and they are practically the same, except for table and filed name
 
is Taxable column, calculated column?
 
is the data type for your Taxable field numeric or text?
 

Users who are viewing this thread

Back
Top Bottom