Office中国论坛/Access中国论坛
标题:
[求助][已解决]如何获取一个表的列数呀?
[打印本页]
作者:
jacken
时间:
2006-5-15 18:42
标题:
[求助][已解决]如何获取一个表的列数呀?
请教大侠帮忙,如何获取一个ACCESS的表或查询有多少列呀,在VBA中。
[此贴子已经被LucasLynn于2006-5-15 14:50:54编辑过]
作者:
crg770502
时间:
2006-5-15 21:25
Sub Mcols()
Dim rs As New ADODB.Recordset, Mcol As Long
rs.Open "select * from 表1", CurrentProject.Connection
Mcol = rs.Fields.Count
End Sub
欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/)
Powered by Discuz! X3.3