标题: 请教怎么判断查询有无记录? [打印本页] 作者: 呈易 时间: 2006-5-22 04:11 标题: 请教怎么判断查询有无记录? 请教怎么判断查询有无记录?作者: andymark 时间: 2006-5-22 05:51
Dim Sql As String
Dim Rs As New ADODB.Recordset
Sql = " select * from 查询1"
Rs.Open Sql, CurrentProject.Connection, adOpenDynamic, adLockOptimistic
If Not Rs.EOF Then
DoCmd.OpenQuery "查询1"
Else
MsgBox "查询没有记录"
End If
Set Rs = Nothing作者: goooer 时间: 2006-5-22 05:55
我认为可以用