【发布时间】:2011-03-23 07:40:00
【问题描述】:
我想看看是否有一个命令可以一次显示整个记录(行)。到目前为止,我只找到显示单个列的方法。我正在使用 ADO 连接到 ms 访问的 mdb。谢谢。顺便说一句,我不知道如何在 MS Access 的 VB 表单中打印一条消息.......vb 是否提供了一个控制台来显示它? Debug.Print 什么都没给我,我只用 MsgBox 成功...
With cmdCommand
.ActiveConnection = conConnection
.CommandText = "SELECT * from tableA"
.CommandType = adCmdText
End With
With rstRecordSet
.CursorType = adOpenStatic
.CursorLocation = adUseClient
.LockType = adLockReadOnly
.Open cmdCommand
End With
If rstRecordSet.EOF = False Then
rstRecordSet.MoveFirst
Do
MsgBox rstRecordSet.Fields(0) & " " & rstRecordSet.Fields(1)
rstRecordSet.MoveNext
Loop Until rstRecordSet.EOF = True
End If
【问题讨论】: