URGE: Conocer el nombre de un indice de una tabla
Hol@
Necesito saber cual es la instrucci贸n/es para saber si existe o no un determinado indice en una tabla para podr crearlo en caso negativo.
Ya que el dgte trozo de c贸digo me esta dando Error rn T.de Ejecuci贸n
Function ExisteIndice() As Boolean
Dim dbs As Database
Dim existe_indice As Boolean
Dim miTabla As TableDef
Dim idx As Index
Set dbs = CurrentDb
Set miTabla = dbs!HISTORICO_PLC
existe_indice = False
With miTabla
Select Case .Indexes.Name
Case "脥ndiceHISTORICO_PLC"
existe_indiceHISTORICO = True
Exit Function
Case "KK"
existe_indiceHISTORICO = True
End Select
End With
End Function
Necesito saber cual es la instrucci贸n/es para saber si existe o no un determinado indice en una tabla para podr crearlo en caso negativo.
Ya que el dgte trozo de c贸digo me esta dando Error rn T.de Ejecuci贸n
Function ExisteIndice() As Boolean
Dim dbs As Database
Dim existe_indice As Boolean
Dim miTabla As TableDef
Dim idx As Index
Set dbs = CurrentDb
Set miTabla = dbs!HISTORICO_PLC
existe_indice = False
With miTabla
Select Case .Indexes.Name
Case "脥ndiceHISTORICO_PLC"
existe_indiceHISTORICO = True
Exit Function
Case "KK"
existe_indiceHISTORICO = True
End Select
End With
End Function