Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2010
    Posts
    12

    Unanswered: Results from a query into a different form

    Please help me out here.

    How can i put the results from a query into a form which I had previously created? (Don't get me wrong. I do not want to create a form from my query)

    and how can I put the results from my query into a table?

    (I'm using Ms Access 2007)

  2. #2
    Join Date
    May 2010
    Posts
    601
    It would help; to have more details about what you are doing

    some suggestions:

    1) set the form's record source to the query

    2) Use an append query.
    Boyd Trimmell aka HiTechCoach HiTechCoach.com (free access stuff)
    Microsoft MVP - Access Expert
    BPM/Accounting Systems/Inventory Control/CRM
    Programming: Nine different ways to do it right, a thousand ways to do it wrong.
    Binary--it's as easy as 1-10-11

  3. #3
    Join Date
    Jun 2010
    Posts
    12
    My form looks like this

    Invoice

    Invoice_ID: 120000
    Customer_ID: C000001
    Invoice_date: 12/9/2009
    Invoice_details: -

    (transaction table)
    Transaction_ID | Customer_ID | Product | transaction_amount | transaction_date
    1 | C000001 | 2 | $12.00 | 12/9/2009
    2 | C000001 | 1 | $11.50 | 12/9/2009
    3 | C000001 | 8 | $25.00 | 12/9/2009
    4 | C000001 | 12 | $32.00 | 12/9/2009
    (end of transaction table)

    Total Of transaction_amount: _________

    ___________________________

    I created a cross-tab query that calculates the total transaction amount for all the transactions that has the same invoice_ID.

    so how to I put the results into the 'Total Of transaction_amount' in my Invoice form?
    For this record, the total of transaction amount should be 80.50

    Or is there any other way to produce the same result?

  4. #4
    Join Date
    May 2010
    Posts
    601
    Are you wanting to store a calculated value?

    Normally this is not advised and violates one of the rules of proper data normalization.

    If I am following correctly, I would create another query that is a totaling query (not a cross tab) by Invoice ID. There are several options to get the total on the form.Here are a few: 1) use an additional sub form to show the total. 2) use a Dlookup() in the control source ofr a text box.
    Boyd Trimmell aka HiTechCoach HiTechCoach.com (free access stuff)
    Microsoft MVP - Access Expert
    BPM/Accounting Systems/Inventory Control/CRM
    Programming: Nine different ways to do it right, a thousand ways to do it wrong.
    Binary--it's as easy as 1-10-11

  5. #5
    Join Date
    Jun 2010
    Posts
    12
    Hey HiTechCoach.

    I followed your way and I got the results that I wanted!
    Thank you so much for your help
    Couldn't have done it without you.

    Really appreciate your help.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •