Results 1 to 2 of 2

Thread: Get Column Names

  1. #1

    Thread Starter
    Addicted Member hyousuf2's Avatar
    Join Date
    Dec 2004
    Location
    Dublin
    Posts
    226

    Get Column Names

    how do i get the Column Names of a Table in Access.
    i know how to do in SQL Server 2000, so wanted to if it is possible in Access as Well
    Women ...r like tea bags, you neva know how strong they really r untill u put them in hot water

    Huzefa Yousuf
    Software Engineer
    Verticity Inc.
    +92-345-2235303

    [email protected]

  2. #2
    Fanatic Member r0ach's Avatar
    Join Date
    Dec 1999
    Location
    South Africa
    Posts
    722

    Re: Get Column Names

    Use ADO.

    Open the table in a recordset, and from there you could do this:

    VB Code:
    1. Dim i As Integer
    2. For i = 0 to oRecordset.Fields.Count - 1
    3.   MsgBox "Column " & (i + 1) & " : " & oRecordset.Fields(i).Name
    4. Next

    r0ach™
    Don't forget to rate the post

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