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

    Form/Subform Control Naming - Again (A2K)

    Simple Problem:

    I want the data of a field on the SubForm to be available for calculations on the Main Form and I have it set up as follows following what I thought was the correct format found in any number of postings. Somehow I seem to be missing something because a get the old #Name? display in the txtMainFormCalc field.

    Main Form Name: frm Estimating ModelMaster
    SubFormControlName: T00_DPMData
    ControlName on SubForm: txtCalc0015
    Data in ControlName: Calc0015


    ControlName on MainForm: txtMainFormCalc
    ControlSource for txtMainFormCalc is as follows

    =[Me]![T00_DPMData].[Form]![txtCalc0015]

    Would appreciate any help as always
    Cheers,
    Andy

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

    Re: Form/Subform Control Naming - Again (A2K)

    Andy,

    Me is a vba word. You don't use it in a textbox control source.
    Use :
    =[T00_DPMData].[Form]![txtCalc0015]
    Francois

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

    Re: Form/Subform Control Naming - Again (A2K)

    When are you getting the error? You will get an error like that if there is no data in the subform for that parent form, assuming that the subform control is also a calculated field on the subform. Is that the situation?
    Charlotte

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

    Re: Form/Subform Control Naming - Again (A2K)

    Francois, many thanks. It's always about Me. Once I got rid of Me, all was good. There is something Freudian about that comment, but I'm not sure what.
    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: Form/Subform Control Naming - Again (A2K)

    Charlotte, my thanks to you again for watching over my shoulder. It's really nice to know that no matter how big or little my problems, as well as the other posters, that you always come through with great pointers. Not sure if you noticed the end of my "Movie" saga in Post 409695, but you again did point me in the right direction. Thanks muchly,

    Andy
    Cheers,
    Andy

Posting Permissions

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