Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo Format problem
Message
From
14/12/2001 02:32:31
 
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00590977
Message ID:
00594273
Views:
20
Hi,

Thank for your help, for the datacombo box,
is there any way to list more than one field
like this

cbodata.ListField = "VipCode & VipName" <======= this give error

as the compiler report of error when I code the above statement
insteads of only

cbodata.ListField = "VipCode" <======== this is okay



>>>>Hi,
>>>>
>>>>Thank for your help and advise.
>>>>BTW, how do I go about using a fixed font in my combobox problem
>>>>since it is due to the font problem ? Which font is a fixed fonts ?
>>>>
>>>
>>>Courrier
>>
>>Hi,
>>
>>As mentioned previously, if I want to programmtically
>>bind an ADO recordset to a auto filled combo, I should be using
>>data combo control.
>>
>>However, it don't seem to auto fill up the combo box with my
>>data at all. I am using code insteads of the ADO control with part of
>>my code shown below, please kindly advise and comment.
>>
>>
>> Set cnn = New ADODB.Connection
>> Set rs = New ADODB.Recordset
>>
>> ...
>> ...
>>
>> cboDataCombo.ListField = "Vip"
>> set cboDataCombo.RowSource = rs
>
>
>Set the RowSource property before the ListField property like this:
>
Private Const mkCS As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Projets VB\NWIND.MDB;"
>
>Private Sub Command1_Click()
>Dim rstData As ADODB.Recordset
>
>    Set rstData = New ADODB.Recordset
>    rstData.Open "SELECT LastName FROM Employees", mkCS, adOpenStatic, adLockReadOnly
>    Set DataCombo2.RowSource = rstData
>    DataCombo2.ListField = "LastName"
>End Sub
Best Regards
Virusim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform