Decimal Place Calculations

markjohnson

Registered User.
Local time
Today, 20:30
Joined
Dec 13, 2012
Messages
10
Hi All,

I am trying to do a calculation in Access based on a value on a form.

In the text box where my calculation is, it says;

=[Text863]*13.59

Text863 is a combo box with dropdown list, that contains values 0.25, 0.5, 1, 1.25 etc etc

However, if anything that isnt a whole number is selected (IE 1.25) then it multiplies it by the nearest number (so 1 in that case) - but I want it to multiply by 1.25!

In the properties sheet for Text863, the number type is set to "Standard" and 2 Decimal Places - can someone please help!

Thanks
 
I am a little concerned about the [Text863] as the name of your combo box. Normally when you add a combo box to your Access form, Access will provide a name like "combo0" for the first combo box added. There are a couple of ways that you could have the name that you are refering to but my concern is that you are actaully referencing the correct control.

I have not been able to recreate the issue you describe, even when I change the format of the calculation text box. I simply added one combo box (named Combo by default) and one text box (named Text2 by default). I changed the Row Source type to be "Value List" and copied the values you provided (0.25, 0.5, 1, 1.25) as the row source. I created the calculation ([Combo0] * 13.59). I opened the form in Form View and each time I select a value from the combo box the calculation is performed exactly as would be expected.

My suggestion is that you try creating a new form and creating the controls and calculation again and see if it works.

Hope this helps.
 
Yes, thats it! I think the problem was that the field was orignally a text box that i changed to a combo box.

Now i have added a new combo box, and rejigged the formula, it works, so..

PROBLEM SOLVED! THANKYOU!
 

Users who are viewing this thread

Back
Top Bottom