Results 1 to 4 of 4
  1. #1
    lamarw is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Posts
    2

    QRY good in query builder, bad as recordsource


    Hi, I have the following query:
    Code:
    SELECT [Active Publishers].[Full name], IIf([Domicile]=0,'Hall',[Active Publishers_1].[Last Name] & ' Home') AS FSGDomicile, FSGDomicile.DoWTime, [Active Publishers].PIF FROM ([Active Publishers] LEFT JOIN FSGDomicile ON [Active Publishers].[FS Group] = FSGDomicile.FSG) LEFT JOIN [Active Publishers] AS [Active Publishers_1] ON FSGDomicile.Domicile = [Active Publishers_1].PubID WHERE ((([Active Publishers].[FS Group])=1)) ORDER BY [Active Publishers].[Last Name], [Active Publishers].PIF, [Active Publishers].[First Name];
    When I execute this in MSAccess 2007 query builder it works correctly. When I use it as a report recordsource it ignores PIF. In the builder it correctly selects the records and correctly sorts them as: Last name (always string), PIF (always numerical), First name (always string). When I use it as the recordsource to the report it results in Last name, First name. PIF is ignored. Any help you could provide would be very much appreciated. Lamar

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Sorting in a query doesn't affect sorting in a report.

    You have to do sorting in a report using the "Sorting and Grouping" command (Access 2000). I don't remember where it is located in A2007 - it is in a ribbon - maybe Design or Format group.

  3. #3
    lamarw is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Posts
    2
    That was it! Excellent! Thank you very much.

  4. #4
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Ready to mark this solved?

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

Similar Threads

  1. Grouping and Addiing using Query Builder
    By GAccess in forum Queries
    Replies: 4
    Last Post: 05-22-2012, 02:10 PM
  2. expression builder: update query
    By JMac in forum Access
    Replies: 3
    Last Post: 05-04-2012, 03:19 AM
  3. Run Query in Macro Builder
    By chewbears in forum Queries
    Replies: 0
    Last Post: 11-21-2011, 09:18 AM
  4. sql query builder and tables
    By benjammin in forum Queries
    Replies: 1
    Last Post: 05-28-2011, 02:11 AM
  5. Replies: 0
    Last Post: 05-09-2011, 01:51 PM

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