Results 1 to 8 of 8
  1. #1
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Referencing Fields (A2K)

    Scenario:

    On a Parent Form, I have a field called: txtOnHand

    On a SubForm I have a field called: txtK_QOH with the data source being: =Parent!txtOnHand

    This all works very nicely.

    The problem I
    Cheers,
    Andy

  2. #2
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Referencing Fields (A2K)

    I have used this

    If Forms!frm_TOC_BP_ACD.[CODataSubForm].[Form]![codata count] = 0 Then

    HTH John

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

    Re: Referencing Fields (A2K)

    On a report, there should not be any need to refer to txtK_QOH since that refers to a control on the main form, so you can refer directly to the control on the main form:

    =[Forms]![NameOfMainForm]![txtOnHand]

    Why would you want to store a value from the main form in the table underlying the subform? It doesn't belong at that level.

  4. #4
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Referencing Fields (A2K)

    Thanks Hans,

    Personally, I would never do this on any system of my own, BUT, SOMEONE ( the cheque signer ) wants to, sometime in the future, know what the QOH was at the exact time that the record was created. And, yes, I have pointed out the potential problems that they could run into in the future. I'm also making them aware of the comments from the likes of yourself, and Charlotte who has commented on this type of situation in the past, and what they could be facing.

    Thanks kindly for both your help and your soon to be shared words of wisdom,
    Cheers,
    Andy

  5. #5
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Referencing Fields (A2K)

    John,

    Thanks for the quick and accurate reply. You can tell from my response to Hans that I'm half way up/down a programming, slipper, slope. The customer is always right?

    Cheers,
    Cheers,
    Andy

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

    Re: Referencing Fields (A2K)

    You could use the Before Update event of the subform to store the value of the text box in a field in the table.

  7. #7
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Referencing Fields (A2K)

    Thanks Hans,

    That part, with respect to some of the other fields that will be viewed in the future, has already been implemented. I've got a specific prefix for these guys so that I can keep an eye on "funny" stuff; all of these fields start wit WB_ as in WriteBack_ or if something does go strange, WrongBuddy_
    Cheers,
    Andy

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

    Re: Referencing Fields (A2K)

    Or WeirdBusiness_ ... <img src=/S/evilgrin.gif border=0 alt=evilgrin width=15 height=15>

Posting Permissions

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