Results 1 to 4 of 4
  1. #1
    keiath is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    162

    Query Not working

    Hi Guys have a strange little problem:-

    I import Invoices into a table:-

    ID Site Code Invoice Date PO Invoice Contractor Invoice Amount Expense Code Exp Description Lease Code Status
    1 0289S 20/09/2013 34660 3410 Dj Commercial Cleaning Ltd 25.23 62
    A Pending
    2 0289S 28/09/2013 34606 1141 Platinum Landscapes 240.00 55
    A Authorized on 19/09/2013 by KF, Paid on 24/09/2013
    3 0289S 03/09/2013 35311 2021 Clean And Green 167.00 63
    B Authorized on 19/09/2013 by KF, Paid on 24/09/2013
    4 0289S 02/08/2013 35311 2015 Clean And Green 174.00 63
    A Authorized on 19/09/2013 by KF, Paid on 24/09/2013

    That's all straight forward, that data is drive by the site code.

    Then i Run a query that groups the invoices By Lease Code and Expense Code, in this query it only returns results for Group A

    Site Code Group Code Exp Code Expense Discription SumOfInvoice Amount Group Total
    0272S A 52 General Expenses £210.09 0.00
    0272S A 55 All Grounds Maintenance £9,666.20 10,347.53
    0272S A 59 All Lift Expenditure £499.20 0.00
    0272S A 64 Refuse Collection £4,881.11 1931.91
    0272S A 67 Pest Control £1,146.00 0.00
    0272S A 79 Electricity £1,294.59 0.00
    0272S A 87 Insurance Premiums £255.51 274.47
    0272S A 91 Accountant & Solicitors Fees £2,880.00 2880.00
    0272S A 92 RCS Legal Fees £939.69 915.22
    0289S A 52 General Expenses £986.88
    0289S A 54 Alarms/Access/Security/Entryph £878.65
    0289S A 55 All Grounds Maintenance £24,188.72
    0289S A 58 Drain Clearance (Contracts) £892.20
    0289S A 62 Window Cleaning £4,791.23
    0289S A 63 Cleaning General £9,837.00
    0289s A 64 Refuse Collection £1,140.25


    0289S A 65 Repairs & Day to Day Maint £13,700.13

    Now I just added a new bunch of invoices that are clearly in the Table, but when I run the query its not showing anything for site code 0170S, I checked all the data to ensure its 'the same' as all the others

    Any ideas why this is happening?

    Thanks in advance

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    No idea. If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    keiath is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    162
    I have actually worked it out by process of going though and removing bits. The 'Group Code' is actually Previous year Group Total that comes from another table. Because the Exp Code is part of a relationship with both tables, if I dont have the code in the Previous year table it doesn't display anything.

    So as it stands I would have to ensure that previous years amounts are inputted first, unless there is a way around that problem?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Sorry, don't understand the circumstances as described. Don't know the data structure.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. query not working
    By BigDan in forum Access
    Replies: 15
    Last Post: 11-12-2013, 09:09 AM
  2. Sum IIF query not working!
    By Distinctive in forum Queries
    Replies: 8
    Last Post: 09-27-2013, 08:14 AM
  3. Replies: 3
    Last Post: 10-17-2012, 09:24 AM
  4. Help please! iif not working in query!
    By ham355 in forum Queries
    Replies: 4
    Last Post: 02-16-2012, 05:05 AM
  5. Query is not working
    By pushpm in forum Programming
    Replies: 3
    Last Post: 04-14-2009, 07:16 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