I'm trying to multiply one column called "Price" and the other called "Tax" and the result to end up in the column called "Cal_Tax". I've tried and tried and keep getting some really werid results, can someone please HELP!!!!!
MichaelRed is right, if you need to store the result (Cal_Tax) in the table. This would also mean you need to run the update query everytime you add a record.
You might be better off though if you make a normal query which returns this value, and base your forms/reports on that query. The query needs to have the table you are referencing, plus an expression:
Cal_Tax: [Price] * [Tax]
in the Field space in the QBE (query) grid. This arrangement would have the added benefit of Cal_Tax being read-only.
Thanks for the info, I did exactly as both have mentioned and all that gets returned to the table are 0's or 1's. Can you guys figure out why this is happening?
mAD-1:
Check your field data types for all the fields: Perhaps you're multiplying $5.00 (currency) * 5% (single/double) and the Cal_Tax field would have to be single or double to accept fractions... You may need to add some conversion math here to see a correct result. Gord
ghubbell@total.net
Gord is correct, It almost certainly has to do with the data type of one of the variables. If you have added the field to the table, the default data type is Long (Integer). If one of the fields (Tax?) is a single (decinal) w/ a value of ~ 3 (0.03) to 5 (0.05) Percent, and the reatil field is ~ < 20. to 30. then most of the values would be 0 or 0ne. In this instance, all you need to do is change the data type to Dingle (or double, or curency).
MichaelRed
redmsp@erols.com
There is never time to do it right but there is always time to do it over
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.