dumb data type question

M

Mark Kubicki

i have a field [SortOrder] which is
data type - number
field size - decimal
format - standard
precision - 8
decimal places - 2

however, whn in datasheet view, if if enter a numer (let's say; 150.10,
Access immediately changes it to 150.00

Sorry to say, i give up, could someone tell me what i am doing wrong?
-mark

(when i first created this atble, the field [SortOrder] had an incorrect
data type of text; which was subsequently changed to number after a small
amount of data had already been entered...)
 
J

Jeff Boyce

Mark

A side curiosity ... if the field is actually only to be used for sorting,
why do you need any decimal places at all?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
M

Mark Kubicki

i've got a table of records that needs to get sorted in a non-rational way,
so i created this table with all of the possible values that could be used
in the main table, which is linked to the main table, i then sort on the
[SortOrder] field which contains numbers relating to the order i need the
records sorted in. the decimal place allows me to insert new items at a
later date...



Jeff Boyce said:
Mark

A side curiosity ... if the field is actually only to be used for sorting,
why do you need any decimal places at all?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

Mark Kubicki said:
i have a field [SortOrder] which is
data type - number
field size - decimal
format - standard
precision - 8
decimal places - 2

however, whn in datasheet view, if if enter a numer (let's say; 150.10,
Access immediately changes it to 150.00

Sorry to say, i give up, could someone tell me what i am doing wrong?
-mark

(when i first created this atble, the field [SortOrder] had an incorrect
data type of text; which was subsequently changed to number after a small
amount of data had already been entered...)
 
J

John W. Vinson

i have a field [SortOrder] which is
data type - number
field size - decimal
format - standard
precision - 8
decimal places - 2

however, whn in datasheet view, if if enter a numer (let's say; 150.10,
Access immediately changes it to 150.00

Sorry to say, i give up, could someone tell me what i am doing wrong?

You need to set the Scale to 2. The misleadingly-named Decimal Places property
only controls the display, not the storage. Precision 8, Scale 2 will allow
entries up to 999999.99; you will want Precision 10 if you want to get up into
the ten millions.
 
D

Dennis

John,

Thanks - that little piece of information does explain some things I have
experienced.

Dennis
 

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