注冊 登錄
Office中國論壇/Access中國論壇 返回首頁

zzf9008的個人空間 http://ctxi.cn/?207646 [收藏] [復(fù)制] [分享] [RSS]

日志

批量刪除數(shù)據(jù)庫的表對象

已有 1284 次閱讀2012-5-22 08:18 | 數(shù)據(jù)庫

'調(diào)用方法:Call sc
'
Public Function sc()
Dim dbs As Database
Dim tdf As TableDef
Set dbs = CurrentDb
For Each tdf In dbs.TableDefs
 If Len(tdf.Connect) = 0 And tdf.Attributes = 0 Then
 DoCmd.DeleteObject acTable, tdf.Name
  End If
 Next tdf
 dbs.Close
End Function

評論 (0 個評論)

facelist doodle 涂鴉板

您需要登錄后才可以評論 登錄 | 注冊

QQ|站長郵箱|小黑屋|手機版|Office中國/Access中國 ( 粵ICP備10043721號-1 )  

GMT+8, 2024-10-23 08:29 , Processed in 0.097274 second(s), 16 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

返回頂部