Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Now that I can see the query in Design view, I see a circular linking of 3 tables. Not good. Remove the link between PreviousYearTotals and Invoices2013. I also changed the join types and 0038S shows 3 records in the Exp Sum GA subform. However, I don't think the ExpTotal figures are correct. Note that expense code 91 is listed twice for site codes 0038S and 0272S also 92 for 0272S. This is because Invoices2013 has multiple records for each expense code that are joined to the 1 expense code record in MainSiteTable and the query also has to deal with the data from Previous year that is joined to MainSiteTable. The Previous data cause another unique record for grouping and therefore 2013 expense codes and totals are duplicated. As previously suggested, summarize the Invoices2013 records first then join that summary query to ExpenseCode table and also join the PreviousYear table to ExpenseCode table. Don't use grouping on the second query.




    You are using nnz() function. I've never seen nnz(), just Nz(). However, it seems to work.

    You have a table named Invoices2013. Does this mean you intend to have a table for Invoices2014, Invoices2015, etc? Recommend one table.


    Why isn't SiteNumber set as primary key in MainSiteTable?
    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.

  2. #17
    keiath is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    162
    Hi June.

    I use the nnz as i have a global function so that if there is no data in a field it (as it was returning an error message) this function allows me to ensure = no data = 0.00

    yes it says 2013, but I agree it will be 1 table regardless of year as i want the data out put to roll over for current and previous years and i will rework query to include date range.

    The site code is set as the primary key on the main table, it is the main key on most of them as this is the main source of control

  3. #18
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Did you try suggested query 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.

  4. #19
    keiath is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    162
    Yes but what ever i tried didnt work, the only way i can get it to display budgets and previous year data is to add an invoice in the invoice table with a 0.00 for the amount using ofc the correct exp code with is very messy and could easy be forgotten

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 15
    Last Post: 04-16-2014, 01:15 PM
  2. Showing Related Data in a Form
    By GregWatling in forum Forms
    Replies: 20
    Last Post: 06-11-2013, 07:42 AM
  3. <div> tags showing in form data
    By bar891 in forum Forms
    Replies: 13
    Last Post: 05-20-2013, 12:04 AM
  4. Replies: 4
    Last Post: 02-27-2012, 10:29 AM
  5. Data is not showing up in the form
    By zuerin in forum Access
    Replies: 1
    Last Post: 07-13-2011, 09:16 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