查系统表
请看例子:if not CheckTableExist(log20032) then'check the table exist
Private Function CheckTableExist(TableName As String) As Boolean
    Dim recTemp As New ADODB.Recordset
    Dim strSQL As String
    
    strSQL = "Select name from sysobjects where name = '" & VBA.Trim(TableName) & "'"
    recTemp.Open strSQL, cnn, adOpenKeyset, adLockOptimistic
    
    If Not recTemp.EOF Then
        CheckTableExist = True
    Else
        CheckTableExist = False
    End If
    
    Set recTemp = Nothing
     
End Function