Textbox trubles

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MGrowneyARSI
    New Member
    • Aug 2007
    • 90

    Textbox trubles

    Hello I have a text box That I would like to display both text and variables in I'm puting this code in the control source but I can quite seem to get it to work the two variables are public and set = to dlookups and work fine but the textbox kepps getting errors
    ="Please select between " & [MinVar] & " - " & [MaxVar] & " peers to administer your 360 surveys."
    I'm sure I missing something simple here any help is more then welcome
    TIA
  • FishVal
    Recognized Expert Specialist
    • Jun 2007
    • 2656

    #2
    Originally posted by MGrowneyARSI
    Hello I have a text box That I would like to display both text and variables in I'm puting this code in the control source but I can quite seem to get it to work the two variables are public and set = to dlookups and work fine but the textbox kepps getting errors
    ="Please select between " & [MinVar] & " - " & [MaxVar] & " peers to administer your 360 surveys."
    I'm sure I missing something simple here any help is more then welcome
    TIA
    Hi, there.

    I'm not sure Access allows to include variables even global one in ControlSource expression. You may need to write global function returning that global variable. LOL.

    Comment

    • MGrowneyARSI
      New Member
      • Aug 2007
      • 90

      #3
      That would explain why the code works in a MSGBox but not the textbox I'll give it a try.

      Comment

      • MGrowneyARSI
        New Member
        • Aug 2007
        • 90

        #4
        Well in the end I just set the textbox = text var1 - var2 text in the on open event works great now, what was my boss talking about LOL thanks for the help seems you were right can't do it in the Control Source thanks for pointing me in the right direction unlike my boss.

        Comment

        • FishVal
          Recognized Expert Specialist
          • Jun 2007
          • 2656

          #5
          You are welcome.

          Regards,
          Fish

          Comment

          Working...