Friday, 15 April 2011

Microsoft Access 2003 =SUM() function multiplying by constant -



Microsoft Access 2003 =SUM() function multiplying by constant -

i using microsoft access 2003 alongside visual basic. trying have can add together weights of grouping of select products. part, works successfully. calculate weight based off quantity , product itself. individually, every weight appears correct. look utilize individual product (field titled weightsum) is:

=dlookup("[weight]","[products]","[productid] = " & [forms]![orders]![orders subform].`[form].[productid].[value])*[forms]![orders]![orders subform].[form].[quantity].[value]

i think works fine. now, totalweight, tried utilize this:

=sum([weightsum])

this works long field, "size" not specific value (8x10). i've noticed every product size of "8x10", takes weight in individual category , multiplies 1.5 throughout sum calculation. cannot find indicator of code telling that, , don't think look provided create that. other sizes work fine.

for example, if have 3 products:

product a: quantity: 200 size: 5x5, weight: 0.10 (quantity * weight = 20) product b: quantity: 150 size: 4x4, weight: 0.12 (quantity * weight = 18) product c: quantity: 100 size: 8x10, weight: 0.13 (quantity * weight = 13)

i should 41 lbs, don't. 57.5, since 13 multiplied 1.5 odd reason

the thing can think of , based off have read) has fact values i'm summing calculated values, , not stripped table. however, couldn't seem figure out how add together values. , i'm not sure why method multiply factor of 1.5

any help appreciated.

thank you.

ms-access ms-access-2003

No comments:

Post a Comment