Sort Query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Vish Narayan
    New Member
    • Jun 2011
    • 24

    Sort Query

    I have been struggling with the Dcount function. I have a table created through the make table query. The fields are ORDERNO( TEXT FIELD) INVOICEDATE AMOUNT. The order numbers are grouped together by date in ascending order. All I need is a sequential numbering of the records to be created when the make table query is activated through a macro. Is there a SQL code in MS access that can be set to activate either during the table creation or atleast after the table is created. The name of the table is PAYMENTS. Can somebody assist please
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32662

    #2
    You can run a query (SQL) any time, that you can design to show all (or just a specified set of) records in an order you specify.

    What you require isn't too clear, but if you know which fields you require in the sorting then simply select Ascending or Descending for those fields in the Sort row of the design grid.

    Comment

    • Vish Narayan
      New Member
      • Jun 2011
      • 24

      #3
      I was only looking for a dcount function in a query to get a sequential number for the records for a table created and already sorted in a certain order.

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32662

        #4
        I don't understand what you're talking about. Please be more clear if you can.

        Comment

        • Rabbit
          Recognized Expert MVP
          • Jan 2007
          • 12517

          #5
          It sounds like they're looking for a way to number the records from 1 to n.

          Comment

          • Vish Narayan
            New Member
            • Jun 2011
            • 24

            #6
            Rabbit, you are right. I just need to number the records sequentially at the make table query stage itself

            Comment

            • Rabbit
              Recognized Expert MVP
              • Jan 2007
              • 12517

              #7
              If you're using it in a report, just use a running sum.

              Comment

              • Vish Narayan
                New Member
                • Jun 2011
                • 24

                #8
                Rabbit
                Thanks but I wanted these sequential numbers on the table since I had to create running totals too for the records and there were different order groups etc where a new running sum for each order group was required. However I found another solution and managed. Thanks again for your time. Now I have one more question.
                ** Edit **
                Question removed that has been asked in another thread (Insert Month).
                Last edited by NeoPa; Jul 2 '11, 04:19 PM. Reason: Remove extra Q and added link

                Comment

                • Rabbit
                  Recognized Expert MVP
                  • Jan 2007
                  • 12517

                  #9
                  This is a different question and should be posted in a new thread. Also, please post your solution for this question so that others who are looking for the same thing can find the answer.

                  Comment

                  Working...