need text box on form calculations help please?!

S

sbshelp

on a form i have a text box.

in the control source is the code -

=[BUDGET_TBL]![BUDGET]-Sum([INVENTORY_MAIN_TBL]![QTY]*[INVENTORY_MAIN_TBL]![PRICE])

what i want here is simply the budget left.

it simply is taking a starting budget -budget_tbl and subtracting from the
sum of two fields in a table that are multiplied.

how do i do this?

cant get to give correct answer.
 
K

KARL DEWEY

Are any of the fields null? If so then try -
=[BUDGET_TBL]![BUDGET]-Sum(Nz([INVENTORY_MAIN_TBL]![QTY])*Nz([INVENTORY_MAIN_TBL]![PRICE]))
 
S

sbshelp

nah didnt work - i guess the query basically reads 500 records, then i want
it to multiply quantity and price to get a total.
then i want that total to be subtracted by the budget..

maybe the query is wrong. my expression reads.....

Expr1: [BUDGET]-[QTY]*[PRICE]

that doesnt give a one answer total - shows all 500 and numbers.

thanks man!


KARL DEWEY said:
Are any of the fields null? If so then try --
=[BUDGET_TBL]![BUDGET]-Sum(Nz([INVENTORY_MAIN_TBL]![QTY])*Nz([INVENTORY_MAIN_TBL]![PRICE]))


sbshelp said:
on a form i have a text box.

in the control source is the code -

=[BUDGET_TBL]![BUDGET]-Sum([INVENTORY_MAIN_TBL]![QTY]*[INVENTORY_MAIN_TBL]![PRICE])

what i want here is simply the budget left.

it simply is taking a starting budget -budget_tbl and subtracting from the
sum of two fields in a table that are multiplied.

how do i do this?

cant get to give correct answer.
 
S

sbshelp

anything guys?


sbshelp said:
nah didnt work - i guess the query basically reads 500 records, then i want
it to multiply quantity and price to get a total.
then i want that total to be subtracted by the budget..

maybe the query is wrong. my expression reads.....

Expr1: [BUDGET]-[QTY]*[PRICE]

that doesnt give a one answer total - shows all 500 and numbers.

thanks man!


KARL DEWEY said:
Are any of the fields null? If so then try --
=[BUDGET_TBL]![BUDGET]-Sum(Nz([INVENTORY_MAIN_TBL]![QTY])*Nz([INVENTORY_MAIN_TBL]![PRICE]))


sbshelp said:
on a form i have a text box.

in the control source is the code -

=[BUDGET_TBL]![BUDGET]-Sum([INVENTORY_MAIN_TBL]![QTY]*[INVENTORY_MAIN_TBL]![PRICE])

what i want here is simply the budget left.

it simply is taking a starting budget -budget_tbl and subtracting from the
sum of two fields in a table that are multiplied.

how do i do this?

cant get to give correct answer.
 
Top