16/06/2022, 11:08
programmer67
Atoykan bey, sorunu fonksiyon ekleyerek çözdüm. Bu sorunla karşılaşabilecekler için kodu paylaşıyorum.
Public Function TableExists(ByVal strTableName As String) As Boolean
'Function: Determine if table exists in an Access database
'Arguments:strTablename: Name of table to check
Dim tdf As DAO.TableDef
On Error Resume Next
Set tdf = CurrentDb.TableDefs(strTableName)
TableExists = (Err.Number = 0)
End Function
Public Function TableExists(ByVal strTableName As String) As Boolean
'Function: Determine if table exists in an Access database
'Arguments:strTablename: Name of table to check
Dim tdf As DAO.TableDef
On Error Resume Next
Set tdf = CurrentDb.TableDefs(strTableName)
TableExists = (Err.Number = 0)
End Function