Sorting Weird Text records on my Report

  • Thread starter jlig via AccessMonster.com
  • Start date
J

jlig via AccessMonster.com

I need my output to like the following:
-----------------
svf0-10-1
svf0-10-2
svf0-10-3
svf0-10-4
svf0-10-5
svf0-10-6
svf0-10-7
svf0-10-8
svf0-10-9
svf0-10-10
svf0-10-11
svf0-10-12
svf0-10-13
svf0-10-14
svf0-10-15
svf0-10-16
svf0-10-17
svf0-10-18
svf0-10-19
svf0-10-20
----------------
How do I get my qryCP in Access to sort these as listed?

My query & report is currently giving me:
svf0-10-1
svf0-10-10
svf0-10-11
svf0-10-12
etc...

I think I need to use Instr() to locate the dash, then extract the 10-XX part
to a new field?
On the new field, I need to make it look like a number? and sort Ascending.?

What do you guys think?
Thanks in advance,
jlig
 
O

Ofer

If the number always in the same place, 9 then try this

Order By val(Mid(MyField,9))
 

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