Hi,
I am deleting a table and then making a new table from a query. can someone explain how i can set the index property of a field ("DueDate") to be Yes(No Duplicates) using vba code
The answer depends on what database model you are using: Access (DAO) or SQL Server (ADODB)
For DAO you access the TableDef object that has been created by the query and add an Index to its Indexes collection that has the appropriate properties.
For ADODB you can use SQL Server Data Definition Language SQL commands to add an index to the table or you can use the SQLDMO object to manipulate the indexes directly.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.