Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Apr 2003
    Location
    Morgantown, Pennsylvania, USA
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Still More Subform Total Issues (Access 2000 and up)

    Hello,

    OK, it has finally sunk in to me that when I want to refer to a subform footer control in a main form, I need to use the name of the control that holds the subform rather than the name of the subform itself. I've got that, and I no longer see the #name? error in the control on the main form.

    Now, I have another frustrating issue.

    In my database, I have a form called Order Items, which is used as a subform. I have a text box control called Total that has the following expression: =sum([quantity]*[UnitPrice]). This calculates fine in the single form view of this subform. The subform control on the main form is called frmOrderItems.

    I have placed another text box control on my main form called ItemTotal which contains the following expression in the control source: =[frmOrderItems]![Total]

    When I show the main form in form view, the text box control called ItemTotal is blank. No error message, no nothing. At least if I had an error message I'd have a place to start from, but this blank is extra frustrating. I'm guessing, since I have no error message, that it's a simple fix, which raises my blood pressure all the more.

    What simple thing do I need to do to make the numbers appear?

    Thanks in advance,

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Still More Subform Total Issues (Access 2000 and up)

    From your description, it seems you are doing it correctly. Could you post a stripped down copy of your database? See <post#=401925>post 401925</post#> for instructions. That would enable Loungers to look at the problem directly.

  3. #3
    Star Lounger
    Join Date
    Apr 2003
    Location
    Morgantown, Pennsylvania, USA
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Still More Subform Total Issues (Access 2000 and up)

    OK. It's a practice database, so no confidential information. The Main form is Order Entry. The subform is Order Items. The name of the totals field in the footer of the subform is Total. The name of the control in the main form that contains the subform is Order Items by Company.

    The main form contains a field that is supposed to show the totals of the subform. The field contains the expression =[Order Items by Company]![Total], but it's blank.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Still More Subform Total Issues (Access 2000 and up)

    I'm confused. Your subform is named Order Items, and its control name on the main form is OrderItems, not Order Items by Company. So =[Order Items by Company]![Total] will not work - wrong name. But in the database you attached, the control source of Text30 is =[OrderItems]![Total], and that works - see screenshot.

Posting Permissions

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