Falbala
10-26-2004, 02:14 AM
I want to fill a combobox with data from a recordset. Here is my code :
Private Type InfoJeu
idJeu As Integer
RefInterne As String * 15
nomJeu As String * 25
nomAire As String * 40
End Type
Private TabJeu() As InfoJeu
Private FormatinfoJeu As String * 80
.......................
TabJeu(I).idJeu = Rst!idJeux
TabJeu(I).nomJeu = Rst!nomJeux
TabJeu(I).RefInterne = Rst!RefInterne
TabJeu(I).nomAire = Rst!nomAire
FormatinfoJeu = TabJeu(I).RefInterne + TabJeu(I).nomJeu + TabJeu(I).nomAire
Combo1.AddItem (FormatinfoJeu)
This works but the result is varying depends on recordset. I mean i get this :
"VP001 John Smith"
"VP63287 Elisabeth Williams"
And i would like this :
"VP001 John Smith "
"VP63287 Elisabeth Williams"
How can i get a fixed structure (string15 + string25 + string40) whatever datas in it ?
Private Type InfoJeu
idJeu As Integer
RefInterne As String * 15
nomJeu As String * 25
nomAire As String * 40
End Type
Private TabJeu() As InfoJeu
Private FormatinfoJeu As String * 80
.......................
TabJeu(I).idJeu = Rst!idJeux
TabJeu(I).nomJeu = Rst!nomJeux
TabJeu(I).RefInterne = Rst!RefInterne
TabJeu(I).nomAire = Rst!nomAire
FormatinfoJeu = TabJeu(I).RefInterne + TabJeu(I).nomJeu + TabJeu(I).nomAire
Combo1.AddItem (FormatinfoJeu)
This works but the result is varying depends on recordset. I mean i get this :
"VP001 John Smith"
"VP63287 Elisabeth Williams"
And i would like this :
"VP001 John Smith "
"VP63287 Elisabeth Williams"
How can i get a fixed structure (string15 + string25 + string40) whatever datas in it ?