this is my code.. In my code i have succesful get table column name. But i want the first table column name showing not all. Thanks'

rs.Open(strSQL, adcLEDGER, ADODB.CursorTypeEnum.adOpenKeyset, ADODB.LockTypeEnum.adLockPessimistic)

        Flds = adrCURR.Fields

        TotalCount = Flds.Count

        For Each fld In Flds
             MsgBox(fld.Name)
        Next

Recommended Answers

All 3 Replies

You may use array index - to retrieve columns list.

print Flds(0).Name '1st column
  print Flds(1).Name '2nd column

I used hit n trial to get to this solution..

Paste the contacts.mdb in C:/

One other field you may be interested in is .DataPropertyName if you're looking for the bound field's name. You would access it the same way adatapost showed you in his post.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.