Results 1 to 2 of 2
  1. #1
    byterbit is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Oct 2010
    Location
    Noou Yauk
    Posts
    32

    order by setting itself

    2007, a report based on a query; after it runs(badly) I see the "order by" in properties/data has set itself to: "[contacts].[meter_type] DESC, [contacts].[Meter_Size] DESC"



    This has *nothing* to do with the order by in the SQL statement in the query (see below) OR the sorting I set in "sorting and grouping" (which I set to reinforce the order set in the query.

    I don't get it.



    SELECT contacts.code, contacts.ZIP, contacts.Appointment_Date, contacts.METER, contacts.NEW_METER, contacts.PREFIX, contacts.TICKET, contacts.HOUSE, contacts.CP, contacts.STREET, contacts.ART, contacts.[PART SUP], contacts.CUSTOMER, contacts.PHONE, contacts.meter_type, contacts.[INSP STAT], contacts.[AIP GRP CODE], contacts.[SCHED SND], contacts.[PGM TYPE], contacts.[Appointment _Time], contacts.Status, contacts.notes, contacts.crew, contacts.aip_group, [street] & " " & [art] AS Expr1, contacts.Appointment_Time_order, contacts.Meter_Size
    FROM contacts
    WHERE (((contacts.code)=GetMyVariable()) AND ((contacts.Appointment_Date)=[forms]![daily_report]![text0]) AND ((contacts.Status)="Appointment Scheduled"))
    ORDER BY contacts.Appointment_Time_order;

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    FYI a Report does not use an OrderBy clause in a query. It always uses the OrderBy set in the Report "sorting and grouping" area. You may want to start by *importing* your db into a fresh new db and see if the issue follows: http://www.btabdevelopment.com/ts/impnew

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

Similar Threads

  1. Need help in setting up a DB construction
    By ClownKiller in forum Database Design
    Replies: 5
    Last Post: 01-06-2011, 06:21 PM
  2. Setting value of a formfield
    By toddbuckles in forum Programming
    Replies: 7
    Last Post: 12-27-2010, 09:46 PM
  3. Setting Value for Each Row in Subform
    By swimmermx in forum Forms
    Replies: 11
    Last Post: 07-21-2010, 05:25 PM
  4. Setting up new database
    By mduplantis in forum Database Design
    Replies: 1
    Last Post: 06-23-2010, 11:07 AM
  5. Setting a field in order for Report
    By cotri in forum Reports
    Replies: 2
    Last Post: 01-28-2010, 02:44 PM

Tags for this Thread

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