sort export information

Posted on 2007-08-01
Last Modified: 2010-04-30
Hi, I'm exporting some data from a microsoft access database into an excel spreadsheet.  I'm trying to sort the information I'm exporting first by the "CCy" field and then by the "Instr" field.  The code I've tried is below and does not seem to provide what I'm looking for. Can you help pls ?

Sql = Sql & "ORDER BY (QuDailyPLFinal.CCy) And (QuDailyPLFinal.Instr) "

Question by:f19l
    1 Comment
    LVL 48

    Accepted Solution


    Sql = Sql & "ORDER BY (QuDailyPLFinal.CCy),(QuDailyPLFinal.Instr) "

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Introduction While answering a recent question ( in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
    Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now