Results 1 to 8 of 8
  1. #1
    Riaz is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2018
    Posts
    7

    Calling Value from FORM to Query or Report

    Hi

    I created a Main form and 2 sub forms in it. Main form is for the Contract details with initial contract amount.
    1st sub form for the Variation amount to the contract
    2nd sub form for the progress payment for each contract.


    I made calculation inside the Main form for Total contract amount by adding all the Variation amounts
    and another calculation for Total paid and balance amount by adding all the progress payment.
    Now my question is "How to retrieve those "Total contract amount", " Total Paid" and "Total balance" to either query or report

  2. #2
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Now my question is "How to retrieve those "Total contract amount", " Total Paid" and "Total balance" to either query or report
    Are these controls bound to a table with representative fields? If so, you can use the table as the record source for your query.

  3. #3
    Riaz is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2018
    Posts
    7
    No its not bound to a table, its a independent calculation which i made in form

  4. #4
    Riaz is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2018
    Posts
    7
    Click image for larger version. 

Name:	Capture2.jpg 
Views:	12 
Size:	107.1 KB 
ID:	35653Click image for larger version. 

Name:	Capture.JPG 
Views:	12 
Size:	71.6 KB 
ID:	35654

  5. #5
    Riaz is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2018
    Posts
    7
    Screen shots attached. please refer

  6. #6
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Instead of having unbound controls, why not create queries using the underlying tables of the forms/subforms and then use that information as a subform in your form. In this manner, you already have the information you desire in a query that can become the record source for your reports.

  7. #7
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    A variation of Allan's suggestion would be to use query for the main table and a couple of UDF's to get the Variation amount and the Payment amount, the do the calculation in the query (or in the text boxes in the report).

  8. #8
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Wouldn't a version of SELECT [forms]![form1].[text2] AS [Total contract amount] work for each field?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 6
    Last Post: 11-14-2017, 10:07 AM
  2. Replies: 11
    Last Post: 07-24-2017, 07:06 PM
  3. Duplicate entries and calling query from Form
    By Jray9242 in forum Queries
    Replies: 4
    Last Post: 03-14-2017, 05:45 PM
  4. Replies: 1
    Last Post: 09-26-2011, 03:33 PM
  5. Calling Query from different Access DB
    By Jerry8989 in forum Queries
    Replies: 4
    Last Post: 10-02-2009, 08:48 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