Sorting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi Al
I have a problem with a drop down list that when it sorts it only sorts using the first number so what happens is that 205 will come before 4, is there anyway to fix this.
 
Your "numbers" sound more like Text since for Text values, Access sorts
according to the first character first then the next character if the first
ones match. Hence "205" comes before "4" since "2" comes before "4".

Check the Field type in your Table.

--
HTH
Van T. Dinh
MVP (Access)



Ken said:
Hi All
I have a problem with a drop down list that when it sorts it only sorts
using the first number so what happens is that 205 will come before 4, is
there anyway to fix this.
 
I am using a inventory control template from access and don't know how to change the field type can you help
PS Tank you for your prompt repl
Ke

----- Van T. Dinh wrote: ----

Your "numbers" sound more like Text since for Text values, Access sort
according to the first character first then the next character if the firs
ones match. Hence "205" comes before "4" since "2" comes before "4"

Check the Field type in your Table

--
HT
Van T. Din
MVP (Access



Ken said:
Hi Al
I have a problem with a drop down list that when it sorts it only sort
using the first number so what happens is that 205 will come before 4, i
there anyway to fix this
 
I am using a inventory control template from access and don't know how to change the field type can you help.
PS Tank you for your prompt reply
Ken

----- Van T. Dinh wrote: -----

Your "numbers" sound more like Text since for Text values, Access sorts
according to the first character first then the next character if the first
ones match. Hence "205" comes before "4" since "2" comes before "4".

Check the Field type in your Table.

--
HTH
Van T. Dinh
MVP (Access)




using the first number so what happens is that 205 will come before 4, is
there anyway to fix this.

Ken,
To sort a Text datatype field that contains numbers at the start of
the field (i.e. "347" or "347AB"), you can use Val([FieldName]).
The 347 will sort as though it were a number value, not a text value.

To change the Datatype of an existing field that contains only
numbers, open the Table in Design View.
Find the Field name and change it's Datatype to Number. Then change
the Field Size (in the lower panel) to whatever is appropriate. Keep
in mind that Long and Integer Field Sizes can not contain a decimal
value.
 
Back
Top