m_strSql = " select 客户ID as ID , 公司名称 as Name"
m_strSql = m_strSql & " from 客户表 "
m_strSql = m_strSql & " where 逻辑删除标志位='0'"
Set mDS_Recordset = Nothing
mDS_Recordset.Open m_strSql, gobjDatabase, adOpenStatic, adLockReadOnly, adCmdText
m_strSql = " select 客户ID as ID , 公司名称 as Name"
m_strSql = m_strSql & " from 客户表 "
m_strSql = m_strSql & " where 逻辑删除标志位='0'"
Set mDS_Recordset = Nothing
mDS_Recordset.Open m_strSql, gobjDatabase, adOpenStatic, adLockReadOnly, adCmdText
Do While Not mDS_Recordset.EOF
m_strSql = " select 客户ID as ID , 公司名称 as Name"
m_strSql = m_strSql & " from 客户表 "
m_strSql = m_strSql & " where 逻辑删除标志位='0'"
Set rs = Nothing
rs.Open m_strSql, gobjDatabase, gobjDatabase, adOpenStatic, adLockReadOnly, adCmdText
If rs.RecordCount > 0 Then
MsgBox (rs!Id)
End If
mDS_Recordset.MoveNext
Loop
m_strSql = m_strSql & " from 客户表 "
m_strSql = m_strSql & " where 逻辑删除标志位='0'"
Set mDS_Recordset = Nothing
mDS_Recordset.Open m_strSql, gobjDatabase, adOpenStatic, adLockReadOnly, adCmdText
m_strSql = " select 客户ID as ID , 公司名称 as Name"
m_strSql = m_strSql & " from 客户表 "
m_strSql = m_strSql & " where 逻辑删除标志位='0'"
Set mDS_Recordset = Nothing
mDS_Recordset.Open m_strSql, gobjDatabase, adOpenStatic, adLockReadOnly, adCmdText
Do While Not mDS_Recordset.EOF
m_strSql = " select 客户ID as ID , 公司名称 as Name"
m_strSql = m_strSql & " from 客户表 "
m_strSql = m_strSql & " where 逻辑删除标志位='0'"
Set rs = Nothing
rs.Open m_strSql, gobjDatabase, gobjDatabase, adOpenStatic, adLockReadOnly, adCmdText
If rs.RecordCount > 0 Then
MsgBox (rs!Id)
End If
mDS_Recordset.MoveNext
Loop
这行,另的地方用了没有问题
rs.Open m_strSql, gobjDatabase, gobjDatabase, adOpenStatic, adLockReadOnly, adCmdText