Insert a value from a text box into a report

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • GLEberts
    New Member
    • Mar 2008
    • 51

    Insert a value from a text box into a report

    I am having trouble coming up with how to take a unbound value from a text box from another form and having it show up in a report. I have tried many things with no success

    The form I am looking up information from is "fmestimate "
    Text Box Name is "txtestimatetot al"
    Text Box Control is "=CDbl(nz([txtproductlabor costtotal],0))+CDbl(nz([txtsalescommiss ion],0))

    The above gives me the estimate total

    I then want to be able to print a estimate page with the total.

    Can anyone please help me work this out?

    Thanks
    Gary
  • Delerna
    Recognized Expert Top Contributor
    • Jan 2008
    • 1134

    #2
    In the "Control Source" property of the control on the report that you want to access the control on the form do this.

    [code=vb]
    = Forms![fmestimate]![txtestimatetota l]
    [/code]

    fmestimate will, of course, need to be open before you open the report or it won't work.
    If the form is not open you will see "#Name?" in the control on the report.

    Comment

    • GLEberts
      New Member
      • Mar 2008
      • 51

      #3
      Thanks for your help
      worked like a charm.
      Cheers!

      Comment

      • GLEberts
        New Member
        • Mar 2008
        • 51

        #4
        Delerna,
        I just found a small bump - it is not bound to the "EstimateID "
        However it does show up perfect on the report form with no error.

        i tired to insert at the end =Forms!fmestima te!txtestimatet otal!estimateID
        of course has an error.

        Thanks
        Gary

        Comment

        • Delerna
          Recognized Expert Top Contributor
          • Jan 2008
          • 1134

          #5
          When you say "it is not bound to the estimateID"
          What do you mean? Can you clarify that statment.
          And how, exactly, does EstimateID come into it.

          Regards

          Comment

          • GLEberts
            New Member
            • Mar 2008
            • 51

            #6
            Originally posted by Delerna
            When you say "it is not bound to the estimateID"
            What do you mean? Can you clarify that statment.
            And how, exactly, does EstimateID come into it.

            Regards
            I can clarify pretty simple. don't know what i was thinking about asking that question. just working on the computer for 2 long at a time and had a brain freeze.
            thanks for your help - works great.

            Comment

            Working...