dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Help Please, a simple one I hope.

  1. #1
    Join Date
    Jul 2002
    Posts
    77

    Help Please, a simple one I hope.

    I need to populate a ComboBox with data from Access. Have a table with all the states abbreviations in it and what to use the comboBox, to list them.

    What the best way to Code this?


    Thanks,
    Luisa

  2. #2
    Join Date
    Aug 2002
    Location
    Germany
    Posts
    15
    I hope i understand this right, you want to display Data in a ComboBox ?

    If so,

    1. Properties of the ComboBos Data Tab
    2. in ROWSOURCE you can do any SQL Statement, or Table
    3. BOUNDCOLUMN shows you the Column wich is bound to the ComboBox. You can get the content of a ComboBox in VB like this vBuffer = ComboBox.Value (or .Text) . The Content you will get is the content from the bound col.
    4. go to Format Tab
    5. COLUMN COUNT , there you set the number of Columns to display
    6. COLUMN WIDTHS , there you set the width of each col. you want to display. if you want not to display a col. set the Value to 0. Example :
    4 Columns
    0;2;2;0
    Now you display Col. 2 and 3.
    Best regards
    Markus

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)