Results 1 to 6 of 6
  1. #1
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SubForm Totals Revisited (A2K)

    I've gone through the numerous references to this particular subject on the Forum and have tried various combinations thereof.

    Here is what I'm attempting

    MainForm:

    DataField: OnHandQty
    TextBox: txtOnHandQty

    SubForm:
    SubForm Control Name on Main Form: subReceived
    DataField; QtyRcvd
    TextBox: txtQtyRcvd

    I put a text box ( txtReceived ) on the Main Form as follows and it displays the correct value:

    =[SubReceived].[Form]![txtQtyRcvd]

    I have tried 2 calculation fields in my query that look like this:

    Qty_OnHand_Kalc1: NZ([OnHandQty])+NZ([SubReceived].[Form]![txtQtyRcvd])

    Qty_OnHand_Kalc2: NZ([OnHandQty])+NZ([txtReceived])

    And the last half of each calculation asks for a parameter entry, ergo, ain't right!

    What I want to have happen is to be able to add a number of records in the Receive Subform and have those quantities to be added into the OnHand Qty and dynamically displayed in the Main form and I also, and don't nobody yell, write them back into the Table.

    I may be wrong, but this does not strike me as an overly complex thing, yet I'm managing to turn it into one.

    Will certainly appreciate any help
    Cheers,
    Andy

  2. #2
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SubForm Totals Revisited (A2K)

    There is a good example of the functionality you are trying to attain in the example database supplied with MS Access "northwind.mdb" there is a main order form, with a subform showing line items, and I believe on the main form there is a field containing the sum of the items on subform. I think that's what you are after.

  3. #3
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SubForm Totals Revisited (A2K)

    Thanks Rupert, I'll go and dig out the Northwind Special from Billy Gates' outfit and try and find your example.
    You'll all hear from me I'm sure if I have further problems. By the by, interesting Downloads link.
    Cheers,
    Andy

  4. #4
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SubForm Totals Revisited (A2K)

    There is some useful information on stock control, quantity on hand on the site. I thought you may find it useful.

    MS-Access Tips for Serious Users

    Provided by Allen Browne, allen@allenbrowne.com

  5. #5
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SubForm Totals Revisited (A2K)

    Thanks once more Rupert. I'll have to start referring to you as the Lord of the Links,
    Cheers,
    Andy

  6. #6
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SubForm Totals Revisited (A2K)

    Rupert,

    Just to let you that I was able to find what I needed based on your pointing me in the right direction.
    Thanks again,
    Cheers,
    Andy

Posting Permissions

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