How to sort a data set of addresses?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • brin
    New Member
    • Sep 2010
    • 9

    How to sort a data set of addresses?

    I am tryn to make a datasheet to show the address. I have the fields: house no, street, town, city.

    When I try to sort, the house numbers are not in order? How can i sort them?
    Last edited by Niheel; Oct 21 '10, 10:32 PM.
  • nico5038
    Recognized Expert Specialist
    • Nov 2006
    • 3080

    #2
    Your problem is caused by the fact that your house number is obviously a text field and no real number.
    As a house number can have a suffix, you'll need to "split" the field in two part, a number defined as number and the (optional) suffix. To sort both fields need to be used.

    Nico

    Comment

    • brin
      New Member
      • Sep 2010
      • 9

      #3
      Thank you for the response. But how do i split the field? im new to access. thanks in advance.

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32661

        #4
        Brin, your question is very short of information.

        Get that fixed then we won't be guessing so much what you're talking about.

        Comment

        • brin
          New Member
          • Sep 2010
          • 9

          #5
          sorry abt tht. Bascialy i got four fields. house no/name, street, city, post code. when i view the data in data sheet, address are not in assending order. 1 windor road,3 windor road,10 windsor road, 4 windsor road etc... they are not n order. such as 1 windsor, 2 windsor, 3 windsor so on...how to sort them in orer? thanks in advance experts...

          Comment

          • nico5038
            Recognized Expert Specialist
            • Nov 2006
            • 3080

            #6
            First check or you have addresses with a (character) suffix like: "10 A" or "10-02"
            Next add a new textfield "HousenumberSuf fix" and "move" the "A" and "-02" to there.
            Now change the Housenumber field into a number type and your sort will work correctly when sorting first the house number and than the suffix.

            Nico

            Comment

            • NeoPa
              Recognized Expert Moderator MVP
              • Oct 2006
              • 32661

              #7
              We're still in a similar place really. Sorting something in order relies on knowing which order to sort them in. I doubt simply sorting by House Number would be much use to you. What order of the four fields would you need?

              As a taster, the general answer is to set the Sort: row in your query for the fields you require, and ensure they are displayed in the field order required.

              Comment

              • brin
                New Member
                • Sep 2010
                • 9

                #8
                My database includes the two fields

                "House Number" & "Street"......c urrently I have it in ascending order by "Street", but i want to sort them by house number and street. Eg: 1 windor road, 2 windsor road, 3 windsor road. At the moment it shows like: 2 windsor road, 1 windsor road, 3 windsor road etc... Please help me.

                many thanks in advance

                Brin

                Comment

                • nico5038
                  Recognized Expert Specialist
                  • Nov 2006
                  • 3080

                  #9
                  Just place first housenumber and than street in your query editor. Next set for both the sort to ascending.

                  Nico

                  Comment

                  • brin
                    New Member
                    • Sep 2010
                    • 9

                    #10
                    i did tht nico. it wsnt working untill i place the street first and house secound. it works ok now. i did follow this link {SNIP - Illegal link removed}
                    Thanks for all of you.
                    Last edited by NeoPa; Oct 28 '10, 10:53 PM. Reason: Removed link to competing forum site as that is against our rules.

                    Comment

                    • NeoPa
                      Recognized Expert Moderator MVP
                      • Oct 2006
                      • 32661

                      #11
                      If I must pull teeth :-

                      Where would '2 Bromley Road' appear in your list? Or, to repeat part of my earlier question, which order should the separate fields be sorted in? Number then street (pretty daft for most cases)? Or street then number?

                      PS. Never mind. Now that your latest post has appeared it's clear what the order should have been. Had you answered the question when asked I'm confident the instructions would have accurately supported your requirement.
                      Last edited by NeoPa; Oct 28 '10, 10:55 PM.

                      Comment

                      • brin
                        New Member
                        • Sep 2010
                        • 9

                        #12
                        once again thanks so much guys... u guys r real experts...

                        Comment

                        Working...