Results 1 to 12 of 12

Thread: [Resolved] Expected Funct or Var Issue

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2005
    Posts
    192

    Resolved [Resolved] Expected Funct or Var Issue

    Here is the code. Hopefully it is something simple. I'm still learning VB! I've been stuck on this one for quite a while! The combo box will not work correctly, however the list box does. I've tried dif combonations of the combo object and still no luck.

    Thanks for the help.

    VB Code:
    1. 'Populate UserList
    2.     '==============================
    3.     Dim rs As New ADODB.Recordset
    4.     Dim cn As New ADODB.Connection
    5.     Dim ITM As ListItem
    6.     Dim cb As ComboItem
    7.    
    8.    
    9.         cn.ConnectionString = frmMain.ConnectString
    10.         cn.Open
    11.             sql = "SELECT * FROM Users"
    12.         rs.Open sql, cn, adOpenForwardOnly, adLockOptimistic
    13.        
    14.             ListView1.View = lvwReport
    15.             ListView1.ColumnHeaders.Add 1, , "Autonumber"
    16.             ListView1.ColumnHeaders.Add 2, , "User"
    17.  
    18.         With rs
    19.             Do Until rs.EOF = True
    20.             Set ITM = ListView1.ListItems.Add(1, "", Trim(!autonumber))
    21.             Set cb = cmbAssigned.AddItem(rs.Fields("product"))
    22.             ITM.SubItems(1) = IIf(IsNull(!User), "", Trim(!User))
    23.             .MoveNext
    24.             Loop
    25.         End With
    26.        
    27.     'Populate Priority
    28.    
    29.     'Populate Status
    Last edited by DJHotIce; Jun 28th, 2005 at 05:59 PM.

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