Group By Number Help

GendoPose

Registered User.
Local time
Today, 23:03
Joined
Nov 18, 2013
Messages
175
On my report I have it grouped by something called running order which is quite literally 1, 2, 3, etc.

I'm wondering if it's because it's a text field, but when I group it, it goes 1, 10, 11, 2, 3, 4, etc whereas obviously I want to go in order.

Is it because it's a text field or is there another solution?
 
it is because it is a text value - to convert try using

CLng(RunningOrder)

You may need to do this in the recordsource
 
Yes it is sorting in an Alphabetical order. If they are just numbers why not just declare them as Numbers? If that's something you cannot do, you can cast it to Number by using CLng()
 
Text is ordered alphanumerically so that is indeed what you will get.

If they are numbers then use a numeric field for running order.
 
Three out of three in a minute. Can't argue.
 
Your numbers are not numbers, they are text.

Why did you do that? A Special reason?

Can you go back and change it to Number in the original Table.
 
I can change it but only when all the users are out of the backend, as it's a design change. I've made a copy and changing to a number field definitely works, I'll try the other method now if it means I don't have to go and make design changes and kick all the users out. Thanks guys

EDIT;

they were originally as text because we all weren't sure on how it was going to be written down as, it's something we've not done until now so we had absolutely no idea how our enclosing manager wanted it done until today
 
We really should get lives. Or at least some more demanding Access questions.
 
Make that four in two minutes.

Galaxiom

Did you notice all the others suggest a work around. That is they accept incorrect coding and just come up with fixes.

I suggested that the OP fix the source of the problem.

Sometimes it is hard to be Humble.
 
I can only suggest that you work back 30 minutes one night.

You can get around the problem in the manner suggested, but is this the way you are going to be known.

Close enough is good enough or I take pride in my work and design my tables correctly.

The choice is yours.
 
We really should get lives.
Agreed ! LOL !
Did you notice all the others suggest a work around. That is they accept incorrect coding and just come up with fixes.
Touché RainLover ! But I did mention to Change the Type.
Yes it is sorting in an Alphabetical order. If they are just numbers why not just declare them as Numbers?
But provided an alternative, just because I do not know what the user was dealing with. Maybe it was one requirement that we do not see !

I think it is a good day for me to wander off ! LOL ! Have fun guys ! :D
 
Sometimes it is just easier to accept (or ignore) OP logic - This OP has explained why it is text which given the circumstances is 'reasonable'. Not a true development environment, by hey, often isn't with Access:D
 
@RainLover, workarounds keep us "pro's" in the business... sooner or later people want a "real" fix :)
Edit: Yet another alternative, prefix the column with zero's so that all values are exactly 10 characters (or however many you choose)
Something like: string(10 - len(yourfield) , "0") & YourField
 
Sometimes it is just easier to accept (or ignore) OP logic - This OP has explained why it is text which given the circumstances is 'reasonable'. Not a true development environment, by hey, often isn't with Access:D

CJ

You offered a workaround before having any idea as to why it was Text. It is good that you know how to do a workaround. This makes it easier to spot other peoples faults.

But don't you thing that as a VIP member here you should be promoting correct methods, not train crashes for the future.

Other than that you do a fairly good job here at AWF. Thanks for listening.
 

Users who are viewing this thread

Back
Top Bottom