Results 1 to 7 of 7
  1. #1
    DBenz is offline Advanced Beginner
    Windows 10 Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    86

    what entries in query for this apparent simple ordering result.

    Hi, simple what should query show, see foot of this.
    I have a database for german fighter units WW2.
    each record is for an individual aircraft, showing markings pilot details etc, they are existing in Staffels (squadrons english UK equivalent), 15 or so per staffel.
    My database for each aircraft shows the Staffel Gruppe and geschwader for that aircraft.

    Field for Staffel, it it is just numbers
    Followed by Field for Gruppe, in it is just upper case I's by that it looks and is this......I II III IV Stab I Stab II etc.
    Followed by Field for Geschwader in it is Erpr.gr 210 then JG1 JG2 etc

    There were 9 staffels in a Gruppe and 3 Gruppes (sometimes 4) in a Geshwader.
    Staffels can be 1 2 3 4 5 6 7 8 9
    Gruppe (english name Group) combo list has these as:- "I";"II";"III";"IV";"V";"Stab";"Stab I";"Stab II";"Stab III";"Stab IV";"Stab V" (upper case letters NOT NUMBERS used)
    Geschwader has a specialist low level unit called Erpr.Gr 210 then it has JG1 JG2 JG3 JG26 JG27 JG51 JG52 LG1 LG2



    I wish to have one of the forms based on a query call Qry_St_Gr_Gesch
    Meaning it will display the records in the following manner !
    all records for 1 staffel I Gruppe then likewise starting over at 2 staffel for I Gruppe then 3 and so on.

    Staffel 1 Gruppe I Geshwader Erpr.Gr 210
    Staffel 2 Gruppe I Geshwader Erpr.Gr 210
    Staffel 3 Gruppe I Geshwader Erpr.Gr 210
    Staffel 4 Gruppe I Geshwader Erpr.Gr 210
    Etc (this unit only has I gruppe)

    Then

    Staffel 1 Gruppe I Geshwader JG1
    Staffel 2 Gruppe I Geshwader JG1
    Staffel 3 Gruppe I Geshwader JG1
    Staffel 4 Gruppe I Geshwader JG1

    Up to staffel 9

    Then

    Staffel 1 Gruppe II Geshwader JG1
    Staffel 2 Gruppe II Geshwader JG1
    Staffel 3 Gruppe II Geshwader JG1
    Staffel 4 Gruppe II Geshwader JG1
    Staffel 5 Gruppe II Geshwader JG1

    Up to staffel 9

    Then repeats for Gruppe III

    Then when all done it starts on all that for JG2

    Then when all done repeats for JG3

    Clear as mud !

    What would the query have ?

    I have it with the table then Staffel then Gruppe then Geschwader fields running left to right. And ascending chosen.
    But I don’t see 1staffel I Gruppe ErprGr210 as the first displayed record in the form !

    Cheers
    DBenz

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    You need more than one table.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    You might get away with just using a query sort order, but you're using text (likely with no corresponding numerical sort field) and text sometimes sorts different from what you expect. Rather than adding a sort field for each ordered field in a single table, each entity should have its own table. Those tables will likely need a sort field as well. You could try to use autonumber as a sort order, but you'd have to ensure that the values you want to see are entered in exactly the same order as the autonumber field. However, if you should later try to insert a record between two others, that will then fail to sort properly. That's why I'd use a numerical sort field for that purpose, and the sort values would increase by something like 5 (5, 10, 15 etc.) If I need to insert between 5 and 10 later, I have four spots to choose from.

    EDIT - you don't see the 1st record you expect. What are the first 5 or 10 records you expect and what are the ones you see?
    Mock up and copy/paste in/from Excel and you'll automatically get a table in your post.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,821
    Hi
    Are you able to upload a copy of your database?

  5. #5
    DBenz is offline Advanced Beginner
    Windows 10 Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    86
    Hi, I have sent the dbase and some images to you Mike thanks for PM. cant display to public, too precious and confidential.
    I should get 1 st I gr JG2 then 2 st I gr JG2 but get 1 st I gr JG26 instead, so its not working through in the order I want.
    I get the impression capital I for Gruppe messes up the query working is that what is being warned of ?
    making a table just to be fed the gruppe entries is taxing my abilities and needs external help !
    My chap who designed this, who was into access 20 years ago, but may have rusted up ? or Mike ?

    cheers

    DBenz

  6. #6
    madpiet is offline Expert
    Windows 10 Office 365
    Join Date
    Feb 2023
    Posts
    566
    Is this stuff a hierarchY?
    Staffel 1 Gruppe I Geshwader Erpr.Gr 210
    Staffel 2 Gruppe I Geshwader Erpr.Gr 210
    Staffel 3 Gruppe I Geshwader Erpr.Gr 210
    Staffel 4 Gruppe I Geshwader Erpr.Gr 210

    Then model it like one. Then the aircraft and pilots belong to the lowest level. Then it works.

  7. #7
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Quote Originally Posted by DBenz View Post
    Hi, I have sent the dbase and some images to you Mike thanks for PM. cant display to public, too precious and confidential.
    I should get 1 st I gr JG2 then 2 st I gr JG2 but get 1 st I gr JG26 instead, so its not working through in the order I want.
    I get the impression capital I for Gruppe messes up the query working is that what is being warned of ?
    making a table just to be fed the gruppe entries is taxing my abilities and needs external help !
    My chap who designed this, who was into access 20 years ago, but may have rusted up ? or Mike ?

    cheers

    DBenz
    How can it be confidential?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 06-23-2024, 10:06 PM
  2. query returning ' for no apparent reason.
    By Homegrownandy in forum Queries
    Replies: 5
    Last Post: 08-25-2017, 02:01 AM
  3. Replies: 3
    Last Post: 02-27-2014, 10:50 AM
  4. Replies: 2
    Last Post: 03-28-2013, 12:32 PM
  5. Replies: 5
    Last Post: 06-30-2009, 09:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums