Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Jun 2001
    Posts
    146
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Pulling subform values (Access 2000 SR-1)

    How do you pull values from a subform? I know that forms use the Forms![Form Name]!.Field.Value syntax, but I'm not sure how to get a value from a subform. I've looked high and low in the Access Help and on the Web, but have had no luck.

    Thanks,
    Bob

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Pulling subform values (Access 2000 SR-1)

    In Access 97, Help has a topic: Referring to subforms in expressions , that say this:
    <pre>To refer to a subform or subreport
    Refer to the subform or subreport control on the form or report that contains the subform or subreport,
    then use the Form or Report property of the control to refer to the actual subform or subreport.
    Regards
    John



  3. #3
    2 Star Lounger
    Join Date
    Jun 2001
    Posts
    146
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pulling subform values (Access 2000 SR-1)

    Thanks, that worked.

    In VBA, I used:

    PrimaryCR = [Forms]![Corrections Entry]![CR Subform].[Form]![CorrCR]

    Where Corrections Entry is the main form, CR subform is the subform, and CorrCR is the field value I want from the CR subform.

  4. #4
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Pulling subform values (Access 2000 SR-1)

    Here is a document on all the ways to refer to a subform. I would like to give credit, but I do not remember where I got this on the net.
    Attached Files Attached Files

  5. #5
    3 Star Lounger
    Join Date
    May 2002
    Location
    Toronto, Ontario, Canada
    Posts
    314
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pulling subform values (Access 2000 SR-1)

    It was Keri Hardwick on The Access Web... Here's the link...
    http://www.mvps.org/access/forms/frm0031.htm

Posting Permissions

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