Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting the index for a table in another database 1

Status
Not open for further replies.

zevw

MIS
Jul 3, 2001
697
US
Sorry I am asking all these remote questions today.

here is the code for setting the index to a table in the current database.

Code:
DBEngine(0)(0).Execute "CREATE UNIQUE INDEX PrimaryKey ON RptBal (ID)"

How is it done, when its in another table?
 
Same idea.

[tt]Dim db As Database

Set db = OpenDatabase("C:\docs\ltd.mdb")
db.Execute "CREATE UNIQUE INDEX PrimaryKey ON New2 (ID)"[/tt]
 
Ah! So I learned something new.

I guess instead of DBEngine(0)(0).Execute I can do Currentdb.Execute when its in the current database.

Correct me if I am wrong.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top