Decimal Number

  • Thread starter forcefield via AccessMonster.com
  • Start date
F

forcefield via AccessMonster.com

Hi Everyone,
My problem is very simple and yet I could not solve this problem.
On my form is a combo. The properties are as follows
Control source : Wqty (which is bound to a number field in the table)
Format: when I enter #0.00 it automatically change to Fixed
Decimal Places: 2
Row source type: Value list
Row source: 0.25, 1.25; 1.75; 2.00;

When I select 0.25 on the combo the value changes to 0.00
When I select 1.25 the value changes to 1.00
When I select 1.75 the value changes to 2.00

Can somebody please tell me what is wrong?
 
R

Rick Brandt

forcefield said:
Hi Everyone,
My problem is very simple and yet I could not solve this problem.
On my form is a combo. The properties are as follows
Control source : Wqty (which is bound to a number field in the
table) Format: when I enter #0.00 it automatically change to Fixed
Decimal Places: 2
Row source type: Value list
Row source: 0.25, 1.25; 1.75; 2.00;

When I select 0.25 on the combo the value changes to 0.00
When I select 1.25 the value changes to 1.00
When I select 1.75 the value changes to 2.00

Can somebody please tell me what is wrong?

Look at the underlying table in design view. Specifically the Data Type of
the Wqty field. My guess is that it is currently set to "Number" with a
size of either Integer or Long Integer neither of which support fractional
values.

You would either need to change the size to Single or Double, or change the
Type to Currency or Decimal. I prefer Currency because the Access
implementation of the Decimal type has a few issues. Even if your data is
not "currency" you can still use that type and use formatting to eliminate
the dollar sign from view.

Also note that Single and Double are "imprecise" types meaning that the data
as stored can introduce rounding issues (what you enter or see is not
necessarily the actual value stored). Currency and Decimal do not have that
issue.
 

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