Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2018
    Posts
    2

    Field from subform onto a Report.

    Hello,
    I am very much a novice user of Microsoft Access and it appears my database teacher is too so here I am posting for help!

    I have a hypothetical mail ordering company and I am attempting to generate an invoice for the orders.
    I have frm_Order and frm_OrderProduct.


    frm_OrderProduct contains all my product details, the cost of the product and a calculated Order Total (which includes shipment and any relevant discounts)

    The initial Order Total (I have called this OrderTotal which is an invisible field) has this code:
    Code:
    =Sum([UnitCost]*[Quantity])+[Forms]![frm_Order]![Cost]-[Discount]
    I then have a FinalOrderTotal which is a visible field which contains this code:
    Code:
    =[OrderTotal]-[Forms]![frm_Order]![RepeatedDiscountAmount]
    I want the FinalOrderTotal to be displayed on my report.
    I've added a text field and the Control Source is:
    Code:
    =[Forms]![frm_Order-Product Subform]![FinalOrderTotal]
    This brings up a error of "#Name?"

    I also tried using the code that makes up the FinalOrderTotal and altering it to be:
    Code:
    =[Forms]![frm_OrderProduct]![OrderTotal]-[Forms]![frm_Order]![RepeatedDiscountAmount]
    which brings up the same issue.

    Any help will be beneficial and likely better than my teacher(who came up with a solution by storing derived data)!

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    use the BUILDER, to get paths correct.

    usu, its forms!myForm!subformBox!form!txtBox

  3. #3
    Join Date
    Mar 2018
    Posts
    2
    Tried using the builder as shown below and still having the same issue.
    Click image for larger version. 

Name:	Capture.PNG 
Views:	8 
Size:	58.3 KB 
ID:	33038

  4. #4
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    dont use ALL FORMS. (it doesnt get structure)
    open the form you want to design,
    then use LOADED FORMS to pick your field.
    pick main form
    then pick subform
    then pick control

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

Similar Threads

  1. Replies: 7
    Last Post: 03-01-2018, 06:50 PM
  2. Replies: 3
    Last Post: 04-04-2014, 07:14 AM
  3. Replies: 5
    Last Post: 11-16-2011, 07:30 PM
  4. Pass Subform filter to subform in report
    By camftm in forum Programming
    Replies: 16
    Last Post: 07-19-2011, 07:12 AM
  5. Replies: 7
    Last Post: 07-15-2011, 01:58 PM

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
  •  
Other Forums: Microsoft Office Forums