Currency Data In Field

D

dhstein

I have a field that gets data from a table. ***** The value in the table is
currency AND the field is formatted as currency ******* . The value is .30 (30
cents) which I originally typed into the table manually as .30. When the
field displays it shows as $.30. If I try to edit the field, the value
displayed changes to .300000011920929 This is likely to be confusing to the
user and in addition I just want to understand it and get rid of it. No
doubt it's related to storing a floating point number, but I want to suppress
all these extraneous digits when the user edits. Thanks for any help on this.
 
C

Chris O''C

Decimal places are set to 15. Open the table in design view, click on the
field name, and change decimal places to auto or 2 (or however many decimal
places you really need.)

Chris
 
D

dhstein

Chris,

Thanks for the response. I can't test it now due to other issues I'm
having with changing tables in a split database, but it seems like a likely
solution and I'll try it as soon as I can.
 
D

dhstein

That didn't work - still looking for a solution to this problem - thanks for
any advice .
 
C

Chris O''C

Check the form's properties. Change the decimal places for this field to
auto if it's 15. If the form is bound to a query, open the query in design
view. Change the decimal places for this field to auto if it's 15.

Chris
 
A

Allen Browne

For some reason, the data type is not being recognised as Currency. It
appears to be evaluated as a Double.

Clear anything in the Format property of the text box. Then ask Access how
it understands the data type of the value in the text box. Open the
Immediate Window (Ctrl+G), and enter an expression like this:
? TypeName(Forms!MyForm!Text0.value)
substituting your form name for MyForm, and your text box name for Text0. If
Access does not respond with "Currency" when you press enter, then you will
need to trace the value back (through any queries etc) to see where the
misunderstanding creeps in.
 
A

Allen Browne

Not sure if you saw my reply, but what did you get from:
? TypeName(Forms!MyForm!Text0.value)
 

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

Top