Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding a variable to a string

Status
Not open for further replies.

edrest

Programmer
Apr 22, 2000
73
US
Fairly new to VB.....Not new to programming<br><br>I am trying to take the result of entry into a text box and add it to a string that will be used in a command.<br><br>The text box will contain the name the user wants to give to a table that will be created.<br><br>myString=&quot;Create Table (insert variable here) (name, text);&quot;<br><br>I just can't seem to figure it out. Any help will be appreciated.<br> <p>Tom Gahagan<br><a href=mailto:edrest@alltel.net>edrest@alltel.net</a><br><a href= > </a><br>REST<br>
<br>
Your my reason for reason.... Carlos Santana
 
Edrest<br><br>You just need to tie the fixed portion of your string and the variable portions together with an '&'<br><br>you should check to make sure that the variable &lt;&gt; &quot;&quot; but none the less should look something like<br><br>myString=&quot;Create Table &quot; & text1.text & &quot; (name text,secondname text...);&quot;<br><br>where text1.text represents the variable data that the user has entered.<br>
 
Thanks dsj1967! <p>Tom Gahagan<br><a href=mailto:edrest@alltel.net>edrest@alltel.net</a><br><a href= > </a><br>REST<br>
<br>
Your my reason for reason.... Carlos Santana
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top