Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Nevada, USA
    Posts
    207
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Referencing 2 Subreport Fields in Third Subreport (Access 2000/2002)

    I have the following scenario: Report X contains 3 subreports, A, B and C in its detail section. I need to reference fields from subreports A and C in the detail section of subreport B. I am able to access the fields from subreports A and C in main report X with the following construction: str1 = [Subreport A]![fieldA] and str2 = [Subreport C]![fieldC] but when I try to use this construction in subreport B I receive a message stating "Can't find the field "|" referred to in your expression".

    Any solutions would be greatly appreciated. TIA.
    Carol W.

  2. #2
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    NYC,USA,Earth
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Referencing 2 Subreport Fields in Third Subreport (Access 2000/2002)

    Take a look at the parent property of the subreport. Me.Parent is a pointer to the main report and should allow you then to access the fields on the other subreport using your posted code.

    Me.Parent![Subreport A]![fieldA

  3. #3
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Nevada, USA
    Posts
    207
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Referencing 2 Subreport Fields in Third Subreport (Access 2000/2002)

    Paul:

    Thanks so much. It worked!
    Carol W.

Posting Permissions

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