# Re: 如何得知资料库总比数

Posted by 小呆 on May 08, 1999 at 14:24:16:

In Reply to: 如何得知资料库总比数 posted by 曹家宝 on May 08, 1999 at 09:01:52:

: 如何取得资料库总比数

Dim WS As Workspace
Dim db As Database
Dim rs As Recordset
Set WS = DBEngine.Workspaces(0)
Set db = WS.OpenDatabase("h:\gb\PGB-id.mdb", False, False) '开启档案
Set rs = db.OpenRecordset("gbookid") '选择资料表使用者资料
Debug.Print rs.RecordCount '总笔数
rs.Close '关毕
db.Close '关毕
WS.Close

Follow Ups:

- Re: 补充说明 纪文和 22:23:20 5/08/99 (0)