Greetings all!
I am attempting to complete a sort option on a report. I want to be able to show all records in ascending order of each subset of categories. In other words, I will have different "Locations" where items are going to be stored on shelves. They are labeled by the alphabet- A, B, C, D, E and so on. However I have "sub levels" such as A1, A2, A3, A13, A64 and so on.
The problem I am running into in the report is it is listing the categories and it's sub levels as A1, A10, A11, A12, A13, not like I want them to- A1, A2, A3...A10, A11,...A20
Is there a workaround for this problem? Any help would be greatly appreciated!!
Much thanks!
Adam
5 1639
The problem I am running into in the report is it is listing the categories and it's sub levels as A1, A10, A11, A12, A13, not like I want them to- A1, A2, A3...A10, A11,...A20
Hi Adam. The sort is working correctly, for alpha characters (A10 is indeed a lower sort value than A2 in terms of character ordering) - after all, the sublevel is not a number, but a text string.
If the sublevel number is already available directly as a number in your base query you need to sort the report on the overall category then the level number separately.
I suspect the sublevel number isn't available in your base query or you would already have tried this. If this is so add a calculated field to the underlying query which extracts the level number as a number (substituting the name of the actual field for [SubLevel Field Name] below): -
-
LevelNo: Val(Right$([SubLevel Field Name], Len([SubLevel Field Name])-1))
-
In your report's sorting you will then need to sort on the category then on LevelNo to get the sorting as you want it to be.
-Stewart
the problem might lie with the way access is interpreting your sublevels, as Stewart pointed out. there is prob a smarter way to do it...
NeoPa 32,556
Recognized Expert Moderator MVP
Another way would be to format the sublevel name to include zeroes to the number of places of the maximum value.
Say your sublevels go from A1 to A69, B1 to B69, etc. You could then store them as A01 to A69, B01 to B69, etc.
Obviously, if the maximum value were 720 instead of 69 then you'd need three digits for the number - A001 to A720, etc.
Thanks everyone for your help...I chose NeoPa's suggestion on just adding a zero before the numbers. That was the easiest fix...so common sense.
Thanks again!
NeoPa 32,556
Recognized Expert Moderator MVP
Our pleasure :)
All ideas help in that they get the brain going. I like to store them away for other situations in future.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Pratyush |
last post by:
Hi,
Suppose there is a vector of objects of class A, i.e., std::vector<A>
vec_A(N); The class A satisifies all the STL vector requirements.
Now I wish to add some attributes for each of the...
|
by: Tristan Miller |
last post by:
Greetings.
Do any popular browsers correctly support <q>, at least for Western
languages? I've noticed that Mozilla uses the standard English
double-quote character, ", regardless of the lang...
|
by: Elijah Bailey |
last post by:
I want to sort a set of records using STL's sort() function,
but dont see an easy way to do it.
I have a
char *data;
which has size mn bytes where m is size of the record and
n is the...
|
by: Laurence Nixon |
last post by:
Hello all.
I am seeking ideas on how to determin a specific value with varied
parameters.
This will be for students who have taken modules in a course for
pre-certification. So it will be like...
|
by: Mike MacSween |
last post by:
tblCourses one to many to tblEvents.
A course may have an intro workshop (a type of event), a mid course
workshop, a final exam. Or any combination. Or something different in the
future.
At...
| |
by: Scott |
last post by:
I have a collection where the items in the collection are dates. I want to
iterate over the collection and build a value list string for the rowsource
of a listbox. The dates in the collection are...
|
by: tfsmag |
last post by:
Hello,
I have a function that returns a dynamically created gridview. This
works fine, however it does not seem to be able to maintain state when
adding sorting or paging to the gridview. Does...
|
by: garyhoran |
last post by:
Hi Guys,
I have a collection that contains various attributes (stuff like
strings, DateTime and Timespan) . I would like to access the collection
in various orders at different points in the...
|
by: ECD |
last post by:
Hello all,
I can usually find solutions to my .NET problems by searching these
groups, but I'm stumped on this one. I have a datagrid in VB.NET (2.0
framework). I want to disable sorting on...
|
by: =?ISO-8859-1?Q?Ney_Andr=E9_de_Mello_Zunino?= |
last post by:
Hello.
It seems a year is all it takes for one's proficiency in C++ to become
too rusty. Professionally, I've been away from the language (and from
programming in general), but I still preserve...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |