Number sequence

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

Guest

How do you keep data with numbers in their actual sequential number? I want
to sort data by a field that is a number format. The numbers are, for
instance, 1, 2, 4, 5, 6, 8, 13, 14, 19. When I sort, it puts them in this
order 1, 13, 14, 19, 2, 4 etc. That is not the order I want. Thanks
 
It sounds like your "numbers" are actually Text since "2" comes after
"19...." in Text sorting.

Check the Data Type of the Field in the Table.
 
Yes, it is set to text since I have text within the same field. Is there no
other way around this problem? I need to change the field to "number" - then
I will loose too much data.
 
How do you want to sort Records with entries that cannot be converted to
numeric values?

You can use CInt or CLng to convert from text with digits to numeric values
but since the Field is of Text type. However, CInt / CLng will give you
error when the input to the function cannot be converted to numeric value.
You can use IIf and IsNumeric to partially circumvent this but this leads to
my question above.
 

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

Back
Top