Results 1 to 11 of 11

Thread: Need to load 2 variables on the Form Name

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2004
    Location
    in the heart of the Mediterranean
    Posts
    1,143

    Need to load 2 variables on the Form Name

    Hi,

    I need to load 2 variables in the Title Bar as the Form.Name on Page load but this isnt working.

    Me.Name = fname + " " + surname


    Any help please?
    ------------------------------------------------------------------------
    If an answer to your question has been helpful, then please, Rate it!

  2. #2
    Frenzied Member
    Join Date
    Jul 2008
    Location
    Rep of Ireland
    Posts
    1,380

    Re: Need to load 2 variables on the Form Name

    Me.name is the internal name for the form. Change it to
    vb Code:
    1. me.text = fname + " " + surname

  3. #3
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: Need to load 2 variables on the Form Name

    In what way isnt that working? You need to give us as much information as possible.

    Edit: Ah yes, good find irishman
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  4. #4
    Frenzied Member
    Join Date
    Jul 2008
    Location
    Rep of Ireland
    Posts
    1,380

    Re: Need to load 2 variables on the Form Name

    Number one swede, number one

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2004
    Location
    in the heart of the Mediterranean
    Posts
    1,143

    Re: Need to load 2 variables on the Form Name

    Thanks guys, became rusty!
    Last edited by angelica; Jan 15th, 2009 at 05:38 PM.
    ------------------------------------------------------------------------
    If an answer to your question has been helpful, then please, Rate it!

  6. #6
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: Need to load 2 variables on the Form Name

    Are you still having problems displaying the two variables?
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  7. #7
    Frenzied Member
    Join Date
    Jul 2008
    Location
    Rep of Ireland
    Posts
    1,380

    Re: Need to load 2 variables on the Form Name

    It needs to be in the form load event and would have to be

    vb Code:
    1. me.text = "blah blah blah"

    Your missing the " "

  8. #8
    Frenzied Member
    Join Date
    Jul 2008
    Location
    Rep of Ireland
    Posts
    1,380

    Re: Need to load 2 variables on the Form Name

    Did it work !!!???

  9. #9
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Need to load 2 variables on the Form Name

    should you not also be using the & operator instead of + with strings... or does it not make any difference?
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  10. #10
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Need to load 2 variables on the Form Name

    As long as you have Option Strict ON, it should make no real difference. I much prefer & to +, since it makes it more clear, but they both work the same. Without Option Strict, there is the chance that certain variables might be added rather than concatenated, which has tripped up people in the past, but it isn't common.
    My usual boring signature: Nothing

  11. #11
    Frenzied Member
    Join Date
    Jul 2008
    Location
    Rep of Ireland
    Posts
    1,380

    Re: Need to load 2 variables on the Form Name

    Rep+ Shaggy I never realised that, although I have option strict always on!

Posting Permissions

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



Click Here to Expand Forum to Full Width