Programming question

Feldenak

Lifer
Jan 31, 2003
14,090
2
81
I'm working on VB assignment for class and am a little stuck. I've got a 2D array for customer info that is pulling from an access database. I want to populate a combobox with customer name info from the array. The problem I've run into is the first name and last name are seperate fields in the database. Is there a way I can combine those 2 fields in either the array or the combobox.

Ridicule me if you must, as long as I can get either an answer or a nudge in the right direction. :)
 

BornStar

Diamond Member
Oct 30, 2001
4,052
1
0
Why don't you just concatonate the stings? I'm not familiar with how one would do this from Access into VB but I can't imagine it's that hard. Just do firstname && lastname.
 

Spencer278

Diamond Member
Oct 11, 2002
3,637
0
0
I'm sure there is someway to concatnate the to strings. I'm not sure it might be something like + or & like
string1 & string2 or string1 + string2
 

Feldenak

Lifer
Jan 31, 2003
14,090
2
81
Originally posted by: BornStar18
Why don't you just concatonate the stings? I'm not familiar with how one would do this from Access into VB but I can't imagine it's that hard. Just do firstname && lastname.

Thanks, I'm an idiot. Didn't even consider that route.

This thread can be locked now. :)
 

Alex

Diamond Member
Oct 26, 1999
6,995
0
0
Originally posted by: Spencer278
I'm sure there is someway to concatnate the to strings. I'm not sure it might be something like + or & like
string1 & string2 or string1 + string2

both will work in vb
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
Originally posted by: Feldenak
Originally posted by: BornStar18
Why don't you just concatonate the stings? I'm not familiar with how one would do this from Access into VB but I can't imagine it's that hard. Just do firstname && lastname.

Thanks, I'm an idiot. Didn't even consider that route.

This thread can be locked now. :)


His suggestion might have been a typo, but && is incorrect. The single & as Spencer suggested is the best route to go. && is a common binary logical and operator in C-derivative languages.
 

BornStar

Diamond Member
Oct 30, 2001
4,052
1
0
Originally posted by: Descartes
Originally posted by: Feldenak
Originally posted by: BornStar18
Why don't you just concatonate the stings? I'm not familiar with how one would do this from Access into VB but I can't imagine it's that hard. Just do firstname && lastname.

Thanks, I'm an idiot. Didn't even consider that route.

This thread can be locked now. :)


His suggestion might have been a typo, but && is incorrect. The single & as Spencer suggested is the best route to go. && is a common binary logical and operator in C-derivative languages.
Bah, I figured I did it wrong. I have a very strong background in C and a very weak one in VB.
 

Alex

Diamond Member
Oct 26, 1999
6,995
0
0
Originally posted by: BornStar18
Originally posted by: Descartes
Originally posted by: Feldenak
Originally posted by: BornStar18
Why don't you just concatonate the stings? I'm not familiar with how one would do this from Access into VB but I can't imagine it's that hard. Just do firstname && lastname.

Thanks, I'm an idiot. Didn't even consider that route.

This thread can be locked now. :)


His suggestion might have been a typo, but && is incorrect. The single & as Spencer suggested is the best route to go. && is a common binary logical and operator in C-derivative languages.
Bah, I figured I did it wrong. I have a very strong background in C and a very weak one in VB.

nothing to be ashamed of, vb is pretty useless apart from for learning imo
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
Originally posted by: franguinho
Originally posted by: BornStar18
Originally posted by: Descartes
Originally posted by: Feldenak
Originally posted by: BornStar18
Why don't you just concatonate the stings? I'm not familiar with how one would do this from Access into VB but I can't imagine it's that hard. Just do firstname && lastname.

Thanks, I'm an idiot. Didn't even consider that route.

This thread can be locked now. :)


His suggestion might have been a typo, but && is incorrect. The single & as Spencer suggested is the best route to go. && is a common binary logical and operator in C-derivative languages.
Bah, I figured I did it wrong. I have a very strong background in C and a very weak one in VB.

nothing to be ashamed of, vb is pretty useless apart from for learning imo

An equally ignorant and tangential question.