Results 1 to 8 of 8
  1. #1
    GodivaGirl is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2015
    Location
    Long Beach, MS
    Posts
    18

    Subform that shows Year Budget, YTD spent, & Remaining Budget

    I would like to put a subform on my main form, frmPOinput, that will display the Year Budget, the YTD Spent, and the Remaining Budget. There are 2 different Budget categories that need to be totaled.



    I have an order table, tblOrders, that has all of the items ordered and an OrderNo that differentiates each separate order. I have a query, qryOrders that has a Total column with the criteria: [tblOrders].[Quantity]*[tblOrders].[UnitPrice] to total the amount for each item spent.

    I have a report that creates the Purchase Order and in the footer of a subreport, I have a text box with the following Control Source: =Sum([UnitPrice]*[Quantity]) to give the total of that order.

    I have tried writing a query to get this information but am not successful.

    All help is greatly appreciated.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Why not successful, what happens - error message, wrong results, nothing?

    Post attempted query.

    I expect will involve maybe two aggregate queries and then maybe joining those two.

    Alternative is domain aggregate functions (DSum, DCount, DAvg, etc).
    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
    GodivaGirl is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2015
    Location
    Long Beach, MS
    Posts
    18
    When I run the query or view the form I get nothing on the query view or for the fields on the form.

    I have been looking at the query further and still am getting no results. Here is a screen shot of my query for the form. Help please. :-)

    Supply Data Base Query Screen shot.doc

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    The Quantity * UnitPrice calculation does not go in Criteria row. It goes on Field row. This will create a calculated field in query. Can bind a textbox to that constructed field.
    .
    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.

  5. #5
    GodivaGirl is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2015
    Location
    Long Beach, MS
    Posts
    18
    Okay. I tried what you will see in the screen shot, but I still don't get anything when I run it.

    Supply Data Base Query Screen shot2.doc

    I'm not sure the file attached correctly. Let me know. Thanks so much.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    There is no need for the [tblOrders] prefix in the expression. tblOrders is not even in the query.

    What happens if you remove the filter criteria?
    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.

  7. #7
    GodivaGirl is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2015
    Location
    Long Beach, MS
    Posts
    18
    I tried this and I still do not get anything when I run the query.

    Supply Data Base Query Screen shot3.doc

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    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.

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

Similar Threads

  1. Budget report
    By chavez_sea in forum Reports
    Replies: 13
    Last Post: 08-01-2013, 03:07 PM
  2. 12 months Budget
    By Qian in forum Access
    Replies: 1
    Last Post: 07-14-2012, 02:13 AM
  3. Budget Calculations
    By Arwa in forum Queries
    Replies: 4
    Last Post: 07-26-2011, 03:56 AM
  4. Budget vs Actual
    By chaos in forum Access
    Replies: 1
    Last Post: 05-04-2011, 08:25 AM
  5. Calculating "remaining budget $'s by project"
    By madcreek in forum Queries
    Replies: 3
    Last Post: 04-28-2010, 12:14 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