need text box on form calculations help please?!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
Are any of the fields null? If so then try -
=[BUDGET_TBL]![BUDGET]-Sum(Nz([INVENTORY_MAIN_TBL]![QTY])*Nz([INVENTORY_MAIN_TBL]![PRICE]))
 
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.
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Budget Subforms 19
SubReport 3
SUBTRACT true ckbx value in report 11
Calculated field in main form 4
Getting DCount() to work correctly 2
color coding values 1
HOW DO I? 3
How do I calculate and store results? 3

Back
Top