Hi everyone,
Thanks for taking a look at my question. I am sure it is an easy fix but my stubborn eyes are not seeing the problem and I have been staring at it so long that I knew to come right here.
Attached: Stripped database, relations, jpg of the form
I have a simple database tracking quoted expenses. One form, two queries. You create a quote, add expenses and that's it.
CALCULATIONS
#Type! error for the TRANSAVG
#Error for TRANS and SUMTOTAL
If I take out TRANS and TRANSAVG then SUMTOTAL is just fine.
Are the formulas right? Where am I going wrong here?
THANK YOU!
Laura
View attachment Expense.zip
Thanks for taking a look at my question. I am sure it is an easy fix but my stubborn eyes are not seeing the problem and I have been staring at it so long that I knew to come right here.
Attached: Stripped database, relations, jpg of the form
I have a simple database tracking quoted expenses. One form, two queries. You create a quote, add expenses and that's it.
CALCULATIONS
In the Textbox called SUMTOTAL (calculates Total)
In the Textbox called TRANS (If the category is 1 then Sum)
In the Textbox called TRANSAVG (Average)
ERRORS:
Code:
=Sum([TOTAL])
In the Textbox called TRANS (If the category is 1 then Sum)
Code:
=Sum(IIf([CATEGORY]="1",[SUMTOTAL],0))
In the Textbox called TRANSAVG (Average)
Code:
=([Trans]/[SUMTOTAL])
#Type! error for the TRANSAVG
#Error for TRANS and SUMTOTAL
If I take out TRANS and TRANSAVG then SUMTOTAL is just fine.
Are the formulas right? Where am I going wrong here?
THANK YOU!
Laura
View attachment Expense.zip