Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Apr 2001
    Location
    Guatemala City
    Posts
    515
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Identifiers (WinXP Access 2003)

    I have created a form/subform with totals as shown in Help and example DB NorthWind. I put a total in the footer of the sub, then another textbox in the main form referencing the first. It works, but I don't understand the logic on the address of the second textbox, frmDetail.Form!Total.

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Identifiers (WinXP Access 2003)

    frmDetail.Form!Total
    frmDetail is the name of the subform control containing the subform. This can, but not necessarily, be the same name as the subform. To find out the name of the subform control, open the main form in design view and click once on the subform. Open the property window and see in the Name property on the tab Other.
    Form to address the form in the control
    Total is the name of the textbox that you use in the footer of the subform and contains the total
    Francois

  3. #3
    4 Star Lounger
    Join Date
    Apr 2001
    Location
    Guatemala City
    Posts
    515
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Identifiers (WinXP Access 2003)

    This is working now, thank you, but I have a doubt. You say "This can, but not necessarily, be the same name as the subform." Why would the subform name change when it is placed on the main form in the subform control? Am I correct on the concept of the subform being within a subform control? That was what was confusing me. In one of my forms, the subform is frmDetalle and the subform control is subDetalle. Why the change?

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Identifiers (WinXP Access 2003)

    It's a matter of choice. In some cases, you may wish to swap subforms depending on some criteria, but you want the same code to work, so you name the subform control whatever seems reasonable, and then you set it's source to the appropriate subform. If you're not swapping, then it doesn't matter, since you always refer to the subform itself through the Form property of the control.
    Charlotte

Posting Permissions

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