HELP Query and Index

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cephal0n
    New Member
    • Jan 2008
    • 38

    HELP Query and Index

    Hi everyone!

    I've been studying SELECT INTO in vba and made my own. I was successful in generating my own table,
    Code:
    strSql = "SELECT * INTO tblTemp49 FROM qryUnq49"
        conn.Execute strSql
    now I came accross with a problem. I want to assign an index on my tblTemp49
    but my data came from query (qryUnq49) and since query doesn't support this, its been impossible for me to create one.

    is it possible to assign an idex using vba? and could show me how. please help me with this bec. I really.....real ly need this...pls...pl s...pls!

    thanks in advance!
  • FishVal
    Recognized Expert Specialist
    • Jun 2007
    • 2656

    #2
    Hi, cephal0n.

    You may add index to table via:
    • Access object model using TableDef.Indexe s collection
    • SQL "CREATE INDEX ..." statement


    Regards,
    Fish

    Comment

    • cephal0n
      New Member
      • Jan 2008
      • 38

      #3
      hi! thanks for replying, I have been looking into what you suggested.
      I was wondering if this can be done using ADO (inserting index) in microsoft jet engine and can you help me pls.

      thanks again!

      Comment

      • FishVal
        Recognized Expert Specialist
        • Jun 2007
        • 2656

        #4
        You may execute "CREATE INDEX ..." SQL statement on ADO connection.

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32661

          #5
          What you need to know can be found by :
          1. Start in Access program.
          2. Select Help / Microsoft Access Help.
          3. Select the Contents tab.
          4. Navigate from Microsoft Jet SQL reference.

          We can help if you get stuck, but you need to try it first - otherwise we won't know what you're finding difficulty with.

          Comment

          Working...