Results 1 to 4 of 4
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Retrieving Subform RecordSource Field Value (2003)

    Does the syntax <!t>[table.field]<!/t> to retrieve a field value work in a subform?
    In the startup form of the attached mdb, you can see that the syntax works in the MILPREC text box on the main form but you get #Name? in the LETTUR text box on the subform.

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

    Re: Retrieving Subform RecordSource Field Value (2003)

    Rename the text box to something else than Lettur, and simply use Lettur in the expression.

    And please PLEASE <big>PLEASE</big> turn on "Require Variable Declaration" in Tools | Options in the Visual Basic Editor, and add Option Explicit at the top of existing modules. <img src=/S/grovel.gif border=0 alt=grovel width=31 height=23>

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Retrieving Subform RecordSource Field Value (2003)

    Thank you Hans,
    I have "Require Variable Declaration" turned on, I must have copied the module from other projects. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>
    How come the expression in the MILPREC text box works without the need to rename the text box?

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

    Re: Retrieving Subform RecordSource Field Value (2003)

    I don't know, but I do know that you should avoid giving a calculated control the same name as a field in the record source. It can easily lead to confusion.

Posting Permissions

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