Hi,
Thank a lot for your help.
Since I am using Codebase OLEDB from Sequitter which does not
support the use of SQL command as show below from your example
rstData.Open "SELECT LastName FROM Employees", mkCS, adOpenStatic
Insteads, it support the opening of the database file only like
rstData.Open "vip", mkCS, adOpenStatic
Which does not populate my datacombo box automatically.
Is there any way to open the database file and let the
datacombo box auto populate it without using SQL command
as my data file size is huge. I don't want to use the
manual method of 'AddItem ....' as it is slow and
time consuming, my customer don't like the waiting time
since I am developing a touch program without any keyboard
access.
In addition, is there any limitation of the datacombo box
as data file is huge in size like 32M, is the datacombo
box able to handle it.
If not, any other way to overcome this problem.
Thank you.
>>>>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