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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Append onto a number

Status
Not open for further replies.

TheCandyman

Technical User
Sep 9, 2002
761
0
0
US
Simple question (ya i like those also)

I have a number, but i can not for the life of me remember how to append another number onto it. I have a text box which will show the value (AzDANum). I want to add 60204 then a value from the DB so it ends up like this 60204001.


AzDANum.Value = 60204 And AzDAAID.Value
 
Use the ampersand character (&) to concatenate the 2 fields together.

AzDANum.Value = 60204 & AzDAAID.Value
 
Format ( FirstNumber, "0" ) & Format ( SecondNumber, "0" )

just make you use "&" and not "+" to concatenate the values. The result of this will be a string value.
 
whats with the

format(number....


do i need the format?
 
Not really. lunchg's solution should work. I just have a fetish about doing explicit conversions. The use of

60402 & 4001

(for example) implies a conversion (because of the "&") from numeric to text. The Format statement just makes that conversion explicit.
 
Golom,

Careful how you spell my handle, I got the the whole lunch thing all through elementary school, and someone decided that the 'y' and 'u' characters need to be right next to each other on the keyboard...


Candyman, how did you make out with this problem?
 
The 'u' and 'y' are on different rows in Dvorak... on the left hand side of the keyboard, too.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top