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