By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,984 Members | 2,615 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,984 IT Pros & Developers. It's quick & easy.

HELP Query and Index

P: 38
Hi everyone!

I've been studying SELECT INTO in vba and made my own. I was successful in generating my own table,
Expand|Select|Wrap|Line Numbers
  1. strSql = "SELECT * INTO tblTemp49 FROM qryUnq49"
  2.     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.....really need this...pls...pls...pls!

thanks in advance!
Apr 18 '08 #1
Share this Question
Share on Google+
4 Replies


FishVal
Expert 2.5K+
P: 2,653
Hi, cephal0n.

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

Regards,
Fish
Apr 18 '08 #2

P: 38
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!
Apr 22 '08 #3

FishVal
Expert 2.5K+
P: 2,653
You may execute "CREATE INDEX ..." SQL statement on ADO connection.
Apr 22 '08 #4

NeoPa
Expert Mod 15k+
P: 31,492
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.
Apr 23 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.