Answered by:
Acess 2013 Web App - Create a Composite Index

Question
-
Are composite Keys really supported in Access 2013 Web apps as stated in this post? I'm having difficulty creating one:
Table in Design View> Design Tab>Indexes Dialog Box> under "Index Name" the notation says "The Name for this index. Each Index can use up to 10 Fields" but the "Field Name Dropdown only lets me select one field for each index. Can some genius tell me how to select multiple fields?
-Eric-
Saturday, June 18, 2016 4:45 AM
Answers
-
Ken and Edward -Thank you for the replies. As surmised by Edward, I was trying to create and index that will not allow duplicates across the combination of fields (PrimaryKey Index). Per Edward, that functionality is not available.
My workaround:
I made a short text filed (Indexed, no duplicates) called "Key" then ran an ODBC update query to combine my fields ([Field1]&"/"&[Field2]&"/"&[Field3]) into the "Key" field. Works great!
My data across the multiple fields is static (new records are added but never edited) so I don't ever change the "key".
If required, an OnUpdate Data Macro can change the "key" if any of the relevant fields are changed.
-Eric-
- Proposed as answer by Edward8520Microsoft contingent staff Sunday, June 26, 2016 2:51 AM
- Marked as answer by Edward8520Microsoft contingent staff Monday, June 27, 2016 7:59 AM
Friday, June 24, 2016 7:44 AM
All replies
-
I don't use Access for web applications, so don't know if the index dialogue differs from that in conventional Access. In the latter you select the multiple columns on successive rows of the dialogue, leaving the index name empty in all but the first for the index in question.
Ken Sheridan, Stafford, England
- Proposed as answer by Edward8520Microsoft contingent staff Monday, June 20, 2016 6:06 AM
Saturday, June 18, 2016 12:19 PM -
Hi Eric,
In addition to the reply from Ken, you could not use multiple fields for PrimaryKey index. For custom Index, the image below might be easy to understand. UName and Class is for the same index of UName.
Best Regards,
Edward
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.
- Edited by Edward8520Microsoft contingent staff Monday, June 20, 2016 6:13 AM
- Proposed as answer by Edward8520Microsoft contingent staff Friday, June 24, 2016 6:57 AM
Monday, June 20, 2016 6:12 AM -
Ken and Edward -Thank you for the replies. As surmised by Edward, I was trying to create and index that will not allow duplicates across the combination of fields (PrimaryKey Index). Per Edward, that functionality is not available.
My workaround:
I made a short text filed (Indexed, no duplicates) called "Key" then ran an ODBC update query to combine my fields ([Field1]&"/"&[Field2]&"/"&[Field3]) into the "Key" field. Works great!
My data across the multiple fields is static (new records are added but never edited) so I don't ever change the "key".
If required, an OnUpdate Data Macro can change the "key" if any of the relevant fields are changed.
-Eric-
- Proposed as answer by Edward8520Microsoft contingent staff Sunday, June 26, 2016 2:51 AM
- Marked as answer by Edward8520Microsoft contingent staff Monday, June 27, 2016 7:59 AM
Friday, June 24, 2016 7:44 AM -
Hi Eric,
Thanks for sharing your workaround. I would suggest you mark your reply as answer and then others who run into the same issue would find the solution easily.
Best Regards,
Edward
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.Sunday, June 26, 2016 2:53 AM