VBA, MS Access MS Access в примерах

Удаление Ключа (ADOX)

По материалам: https://www.everythingaccess.com/tutorials.asp?ID=ADOX-programming-examples#ShowAllTables

Function DeleteKeyAdox()
    'Purpose:   Delete relationships using ADOX.
    Dim cat As New ADOX.Catalog
    Dim tbl As ADOX.Table
    
    Set cat.ActiveConnection = CurrentProject.Connection
    cat.Tables("tblAdoxBooking").Keys.Delete "tblAdoxContractortblAdoxBooking"
    
    Set cat = Nothing
    Debug.Print "Key deleted."
End Function

Назад ToTop
L.E. 27.06.2022
Рейтинг@Mail.ru