GohDiamond
"Access- Imagineer that!"
- Local time
- Today, 13:03
- Joined
- Nov 1, 2006
- Messages
- 550
When you link a an ODBC table to MS Access you are asked during the process to Select a Unique Record Identifier.
If you do not select one of the fields then the table will not be updateable.
Why didn't you select a field?
You may be using a VIEW as the linked ODBC Table and the view may consist of more than one table.
Access still needs an index in order to allow the table or view to be updateable.
Here's your Answer:
This will not create a real index in Access, and it certainly will not add an index to the source table or view.
What is does is it tells Access to use the designated field in the table AS IF IT WERE a real index. Thus making the table updateable.
It doesn't seem to adversely affect the linked table content and the new index can be seen in the table attributes.
You're Welcome!!
Credit for this revelation goes to StackOverflow - Albert D. Kallal
If you do not select one of the fields then the table will not be updateable.
Why didn't you select a field?
- Perhaps you don't know which one to select, OR
- You may know that there is NO identifier designated in the ODBC table on the server.
You may be using a VIEW as the linked ODBC Table and the view may consist of more than one table.
Access still needs an index in order to allow the table or view to be updateable.
Here's your Answer:
Currentdb.EXECUTE "CREATE UNIQUE INDEX <<DesiredIndexName>> ON <<LinkedTableName>> (<<FieldToUseAsIndex>>) WITH PRIMARY"
This will not create a real index in Access, and it certainly will not add an index to the source table or view.
What is does is it tells Access to use the designated field in the table AS IF IT WERE a real index. Thus making the table updateable.
It doesn't seem to adversely affect the linked table content and the new index can be seen in the table attributes.
You're Welcome!!
Credit for this revelation goes to StackOverflow - Albert D. Kallal