Need help regarding listview???

I want to display the name field from my access database as a list on my vb form. I use msjet oledb.4.0 for connection and access 2002 version. I can access the data from the database, but need to display the names from the database as a list on my forms, need any suggestion to help me?

Thanks,

Zela

Comments

  • : I want to display the name field from my access database as a list on my vb form. I use msjet oledb.4.0 for connection and access 2002 version. I can access the data from the database, but need to display the names from the database as a list on my forms, need any suggestion to help me?
    :
    : Thanks,
    :
    : Zela
    :
    :
    Maybe you can try something like this:
    Set the View property of your listview to 3-lvwReport,then add the required column header to the listview,and put code like this:

    [code]
    Dim n As Integer
    ado.Refresh
    For n = 1 To ado.Recordset.RecordCount
    lw.ListItems.Add , , ado.Recordset("NameOfTheField")
    ado.Recordset.MoveNext
    Next n

    [/code]

    Hope this helps!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion