|
各位大侠小妹请教下, 单击窗体中的"JudgeVIP", 最后出现"运行时错误3021,当前无此记录"
Private Sub JudgeVIPStatus_click()
Dim rst As DAO.Recordset
Dim Intltdd As String
Dim IntNowdd As String
Dim dd As String
dd = "1" & Right(Format(Date, "yyyymmdd"), 6)
IntNowdd = dd
Set rst = CurrentDb.OpenRecordset("select * from vipstatus")
rst.MoveFirst
Intltdd = rst![k2icdt]
Do While (Not rst.EOF)
If Intltdd < IntNowdd Then
MsgBox Intltdd & dd & " " & IntNowdd & " " & Date & " " & Right(Format(Date, "yyyymmdd"), 6)
'DoCmd.RunSQL "update vipstatus set k2rgco='normal'"
'程序运行此处,用一个EDIT ,日期小于当前日期的将状态更新为 "NORMAL", 这个语句怎么写? 这个SQL语句是错误的,不用了.
Else
MsgBox Intltdd
Debug.Print Intltdd
End If
rst.MoveNext
Intltdd = rst![k2icdt]
Loop
rst.Close
End Sub
[ 本帖最后由 huangchao1980 于 2008-7-1 16:34 编辑 ] |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|