Dumferling
Member
- Local time
- Today, 02:05
- Joined
- Apr 28, 2020
- Messages
- 102
I am trying to locate and then delete a record based on two criteria. For this, I understand I need to use Seek. For Seek to work, I need to define an index. When I run the code though I get "Operation not supported by this type of object" when I hit the line that defines the index. The table is native, not external. The code examples seem to indicate that this is the correct code but it still doesn't work (Access 365). The code is:
Dim dbsLMD As Database
Dim rstLink As Recordset
Set dbsLMD = CurrentDb
Set rstLink = dbsLMD.OpenRecordset("tblCPList")
With rstLink
' Set the index.
rstLink.Index = "ID"
What am I missing to make the index supported?
Dim dbsLMD As Database
Dim rstLink As Recordset
Set dbsLMD = CurrentDb
Set rstLink = dbsLMD.OpenRecordset("tblCPList")
With rstLink
' Set the index.
rstLink.Index = "ID"
What am I missing to make the index supported?