Sub rs(table_name As String, field1 As String)
Set date1 = CurrentDb()
Set table1 = date1.openrecordset(table_name)
table1.MoveFirst
Do While Not table1.EOF
If test!ID = table1(field1) Then MsgBox "已经有这个记录了"
Else: table1.MoveNext
End If
Loop
End Sub
有谁知道是为什么吗?作者: huanghai 时间: 2003-12-31 18:07
试试:
Do While Not table1.EOF
If test!ID = table1(field1) Then
MsgBox "已经有这个记录了"
exit do
Else
table1.MoveNext
End If
Loop 作者: csz1025 时间: 2003-12-31 23:56
怎么没人会吗?作者: jhf567 时间: 2004-1-1 05:07
我看是他用ado来定义dao了。当然是变量没定义。作者: csz1025 时间: 2004-1-1 16:00
jhf567:
你说的是什么意思,那要怎么改呀!