Results 1 to 2 of 2

Thread: Combo box

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    32
    Urgent help needed here

    I have a recorset containing 2 cols of data 1D, and desc
    how do i populate a combo box with the send coloumn?


    thanks

  2. #2
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105
    Following is for a listbox, modify it accordingly.


    Dim rsTmp As Recordset
    Dim nLoop As Integer
    Dim sListStr As String



    frmMain.lstData(1).Clear 'dont want none of that bad data


    Set rsTmp = database.OpenRecordset("SQL command", dbOpenSnapshot)


    If rsTmp.EOF = False Then 'we collect the entries from the table
    Do While Not rsTmp.EOF
    sListStr = Format(rsTmp.Fields(1), "")
    frmMain.lstData(1).AddItem sListStr, nLoop
    nLoop = nLoop + 1
    rsTmp.MoveNext
    Loop
    rsTmp.Close
    End If

    End Sub

Posting Permissions

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



Click Here to Expand Forum to Full Width