Results 1 to 5 of 5
  1. #1
    channiekwon is offline Novice
    Windows 8 Access 2007
    Join Date
    Aug 2015
    Posts
    4

    How to retrieve Data from Multiple Items form when it is used as a subform

    Hi,



    I'm making a purchase order database.
    Initially, what I did was that I created fields of up to 15 items in case the purchases may count up to 15,
    but then felt that it was such a hassle because of the brute force, and that there are possibilities for purchases with more than 15 items and I would have to add new fields again,

    So I ditched that solution and instead created a multiple items form and used it as a subform for my Purchase Order form, which is my main form.

    THIS IS MY MULTIPLE ITEMS TABLE:
    Click image for larger version. 

Name:	itemstable.png 
Views:	15 
Size:	13.1 KB 
ID:	21725


    AND I USED IT AS A SUBFORM HERE:
    Click image for larger version. 

Name:	subform.png 
Views:	15 
Size:	19.3 KB 
ID:	21726


    Now my problem is....
    Click image for larger version. 

Name:	problem.png 
Views:	15 
Size:	7.5 KB 
ID:	21727

    I need to get the total amount from the items with the same Purchase order Number in my subform, so that it can appear in my SUBTOTAL field
    which is a part of my main form
    but I don't know how to get it.

    Please help meeeee
    Or if there is another way I can do a purchase order database that allows me to add any number of items I want without using a subform,

    Please tell meeee

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    On the sub form, in the footer, put the field to sum the col....
    =sum([extTotal])

    this can also be referenced from the master form.

  3. #3
    channiekwon is offline Novice
    Windows 8 Access 2007
    Join Date
    Aug 2015
    Posts
    4
    Waah thanks for answering, but
    May I know what the ext is for Cuz there's an error when I did it

  4. #4
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    when you put the txtbox on the footer, you assigned it a field (well, a formula)
    and it has the formula =Sum([myField])

    is this where the error is? when you view the text box it shows #Name?
    BUT
    to reference it on the MASTER form, you must use the full path to the subform...use the BUILDER to do this
    it will look like
    =me!subform!form!txtSubTotal

    use the builder to pick what you want. It always gets the spelling correct.

  5. #5
    channiekwon is offline Novice
    Windows 8 Access 2007
    Join Date
    Aug 2015
    Posts
    4
    Oh! It works now!! Thank you so so much!!!

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

Similar Threads

  1. Get data from Multiple Items Form Row on click
    By takara in forum Programming
    Replies: 3
    Last Post: 06-03-2015, 06:55 PM
  2. Replies: 22
    Last Post: 01-23-2014, 02:13 PM
  3. Replies: 5
    Last Post: 08-12-2013, 12:53 AM
  4. Replies: 1
    Last Post: 11-08-2012, 02:37 PM
  5. Replies: 18
    Last Post: 01-27-2012, 12:53 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