Results 1 to 5 of 5
  1. #1
    lefty2cox is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    May 2013
    Posts
    163

    Query Issue

    Hi,

    Using Access 2016, I had built a query called "billing". I added the following to the "clientname" criteria

    Like [Enter first few letters of bill to client] & "*"

    I was able to get the query to prompt for this information and then display based on the criteria. Everything was working great all day.

    However, after asking it to sort on an address field while the query was open, it now prompts me twice every time I launch the query.

    Prompts once, I enter a letter, prompts again asking for the same info. I'm confused now.

    It still seems to work but I don't know why it's asking me twice all of the sudden. I can't imaging sorting would cause this.

    Thanks


    Lefty

  2. #2
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,932
    suggest post the sql to your query

  3. #3
    lefty2cox is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    May 2013
    Posts
    163
    Sorry about the run-together format. I'm new at this so I'm not sure where to break it up for ease of reading. My first time in SQL view. I highlighted in red the condition if that helps but gave all of the SQL for the query.



    SELECT Orders.DeliveredDate AS Delivered, [address] & " - " & [city] AS Property, [borrowerfirst] & " " & [borrowerlast] AS Borrower, Clients.ClientName AS [Bill To], Services.Service, Orders.TotalFee AS Fee, Clients.PercentBilled AS Split, AMCs.amcServiceFee AS [AMC Fee], IIf([service]="write",[TotalFee],IIf([amcid]>1 And [billtoid]=3,([totalfee]-[amcservicefee])*[PercentBilled]+[amcservicefee],[TotalFee]*[PercentBilled])) AS Due, Orders.paiddate AS [Paid On], Orders.paid, Orders.ClientID, Status.Status
    FROM Status INNER JOIN (City INNER JOIN (AMCs INNER JOIN (Clients INNER JOIN (Services INNER JOIN Orders ON Services.ServiceID = Orders.ServiceID) ON Clients.ClientID = Orders.BillToID) ON AMCs.AMDiD = Orders.AMCid) ON City.CityID = Orders.CityID) ON Status.StatusID = Orders.StatusID
    WHERE (((Clients.ClientName) Like [Enter first few letters of bill to client] & "*") AND ((Orders.paid)=No) AND ((Status.Status)="delivered"))
    ORDER BY Orders.DeliveredDate;


    Thanks,
    Lefty

  4. #4
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,932
    Can't see anything wrong with the query - suggest check the query properties in the SQL window and remove any sort/filter properties
    Click image for larger version. 

Name:	Capture.JPG 
Views:	4 
Size:	48.1 KB 
ID:	22846

  5. #5
    lefty2cox is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    May 2013
    Posts
    163
    Once again....perfect. Thank you so much.

    Lefty

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

Similar Threads

  1. Replies: 4
    Last Post: 11-14-2015, 03:23 AM
  2. Replies: 5
    Last Post: 01-08-2015, 02:08 PM
  3. Query Issue
    By MaineLady in forum Access
    Replies: 12
    Last Post: 10-28-2014, 01:41 PM
  4. Query issue
    By tedstriker in forum Queries
    Replies: 4
    Last Post: 07-07-2014, 08:04 AM
  5. Query issue
    By mashtha9 in forum Access
    Replies: 1
    Last Post: 06-07-2014, 07:05 AM

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