Combo Box Help 
Author Message
 Combo Box Help

Hello all VB Developers,

I have a question - it goes something like.

I have a form and using ADO and am connecting to an Access Database, and
pull a recordset out of the database and disconnect, the user now has a
recordset he/she can user on there machince.  This is all working fine.

I am then hardcoding and binding the textboxes and ComboBoxes to the
recordset that look something like this:

    Dim ctrl As Control

    For Each ctrl In Me
        If TypeOf ctrl Is TextBox Or TypeOf ctrl Is ComboBox Then
            Set ctrl.DataSource = recADO
        End If
    Next

    'Bind the text boxes to the recordset
    txtSupCode.DataField = "Supplier_Code"
    txtSupName.DataField = "Supplier_Name"
    cboTradTerms = "Trading_Terms"
This is all working fine, the problem I am have is with the comboboxes - NOW
FOR THE BIG QUESTION

If the combobox is a style is 0, then the recordset or ADO allows the data
to be shown within the combobox, but I want to use combobox style 2 the
Drop-down List Box so the user cannot make any entries into the combobox,
only select what I tell them. But when using style I get the following error
message

Run-Time Error '545'

Unable to bind to find or datamember.

Why does this occur when using the style 2 combo box

Thank You

Tristan.



Sat, 05 Jun 2004 08:46:52 GMT  
 Combo Box Help

Hello,

My name is Jian-Wei Yu. Thank you for using the Microsoft VB Newsgroups.

Please use DataCombo instead of combobox. Please go to Project |
Components. Select Microsoft DataList Controls 6.0 in the list.

Hope it helps. If you have any questions, please reply to this post.

Best Regards,  

Jian-Wei Yu
Microsoft Support

This posting is provided "AS IS" with no warranties, and confers no rights.



Sun, 06 Jun 2004 10:20:38 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Combo Box help, need a better combo

2. combo box help

3. Combo Box Help on hovering items...

4. Excel combo box help needed!!

5. Listbox/Combo box help

6. Combo box help

7. VB5 And ACCESS DATABASE> COMBO BOX HELP

8. databound combo box Help Please!

9. Combo Box Help

10. combo box help

11. I have a question about combo boxes - HELP!

12. combo box help

 

 
Powered by phpBB® Forum Software