A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Number Field



 
 
Thread Tools Display Modes
  #1  
Old August 23rd, 2004, 11:35 PM
Dan H
external usenet poster
 
Posts: n/a
Default Number Field

Every time I enter the number 1.10 in the field it changes
to 1.1

I need the field to be able to hold the following number
pattern

1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11,
1.12..etc.

Can anyone tell me why this keeps happening?

Thanks,

Dan H.
  #2  
Old August 24th, 2004, 12:34 AM
Ken Snell [MVP]
external usenet poster
 
Posts: n/a
Default

Because your field is formatted as a number. 1.10 is stored/displayed as
1.1, because ACCESS does not show "significant" number decimal places.

Change the field format to Text in order to store the data the way you want.
Note that a text field will sort in a nonnumeric way, meaning 1.11 will
appear before 1.2 when using ascending order. If you want a numeric sort
behavior, you'll need to use one or more calculated fields (which will
convert the different parts of the text string into appropriate number
values) in the query as the sorting fields.
--

Ken Snell
MS ACCESS MVP

"Dan H" wrote in message
...
Every time I enter the number 1.10 in the field it changes
to 1.1

I need the field to be able to hold the following number
pattern

1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11,
1.12..etc.

Can anyone tell me why this keeps happening?

Thanks,

Dan H.



  #3  
Old August 24th, 2004, 12:49 AM
Dan H.
external usenet poster
 
Posts: n/a
Default

Thanks for you reply.

I understand making the field a text field, I'm not sure
if I know how to create the numeric sort behavior by using
one or more calculated fields to convert the text string.

Would you happen to have an example? or maybe know of a
knowledge based article that would explain this procedure?

Thanks again,

Dan H.


-----Original Message-----
Because your field is formatted as a number. 1.10 is

stored/displayed as
1.1, because ACCESS does not show "significant" number

decimal places.

Change the field format to Text in order to store the

data the way you want.
Note that a text field will sort in a nonnumeric way,

meaning 1.11 will
appear before 1.2 when using ascending order. If you want

a numeric sort
behavior, you'll need to use one or more calculated

fields (which will
convert the different parts of the text string into

appropriate number
values) in the query as the sorting fields.
--

Ken Snell
MS ACCESS MVP

"Dan H" wrote in

message
...
Every time I enter the number 1.10 in the field it

changes
to 1.1

I need the field to be able to hold the following number
pattern

1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11,
1.12..etc.

Can anyone tell me why this keeps happening?

Thanks,

Dan H.



.

  #4  
Old August 24th, 2004, 01:51 AM
Ken Snell [MVP]
external usenet poster
 
Posts: n/a
Default

With your setup, I'd use the Val function to convert to a number, and I'd
use two fields (this assumes that you'll never use more than two numbers
after the decimal point in your values):

ValueSort1: CInt(Val([FieldName]))
ValueSort2: Val(Mid([FieldName], InStr([FieldName], ".") + 1))

Then my query would look something like this:

SELECT * FROM TableName
ORDER BY CInt(Val([FieldName])),
Val(Mid([FieldName], InStr([FieldName], ".") + 1))


--

Ken Snell
MS ACCESS MVP

"Dan H." wrote in message
...
Thanks for you reply.

I understand making the field a text field, I'm not sure
if I know how to create the numeric sort behavior by using
one or more calculated fields to convert the text string.

Would you happen to have an example? or maybe know of a
knowledge based article that would explain this procedure?

Thanks again,

Dan H.


-----Original Message-----
Because your field is formatted as a number. 1.10 is

stored/displayed as
1.1, because ACCESS does not show "significant" number

decimal places.

Change the field format to Text in order to store the

data the way you want.
Note that a text field will sort in a nonnumeric way,

meaning 1.11 will
appear before 1.2 when using ascending order. If you want

a numeric sort
behavior, you'll need to use one or more calculated

fields (which will
convert the different parts of the text string into

appropriate number
values) in the query as the sorting fields.
--

Ken Snell
MS ACCESS MVP

"Dan H" wrote in

message
...
Every time I enter the number 1.10 in the field it

changes
to 1.1

I need the field to be able to hold the following number
pattern

1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11,
1.12..etc.

Can anyone tell me why this keeps happening?

Thanks,

Dan H.



.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ASK Field Behavior Greg Mailmerge 9 July 2nd, 2004 02:44 PM
NUMBERING the pages Bob New Users 7 June 14th, 2004 12:20 AM


All times are GMT +1. The time now is 05:37 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.