| 发表于:2008-01-05 21:33:16 楼主 |
你好 我有一个技术问题请教你可以吗 如果可以我的手机13901948178;邮箱hk59621@sohu.com ;qq号是437570859 是用vb6.0编写的数据库转换程序 数据库是access97数据库做的程序 我的目前使用的电脑是office access2007 无当前记录 运行错误‘3021' 帮助: 无当前记录。(错误 3021) 当底层的 recordset 没有记录或记录己经被删除时,使用 find 或 seek 方法应用程序失败之后,会出现这个错误。选择或移动到另一条记录,然后重试一次。如果 recordset 是空的,不能设置当前记录。请检查 bof 及 eof 属性。 部分代码如下 if mskstartdate.text = "____-__-__" or mskenddate = "____-__-__" then msgbox "time!" mskstartdate.setfocus exit sub end if if rczq.recordcount > 0 then rczq.movelast rczq.movefirst for i = 1 to rczq.recordcount rczq.delete rczq.movenext next i end if ' if data1.recordset.fields(0).value <> "abcdef14" and data1.recordset.fields(0).value <> "abcdef15" then sproductid = data1.recordset.fields(0).value sproductname = data1.recordset.fields(1).value ' end if bfindresult = false datbrowse.recordset.movefirst do until datbrowse.recordset.eof if datbrowse.recordset("fzqdm") = sproductid then bfindresult = true rczq.addnew rczq!zqdm = datbrowse.recordset("fzqdm") rczq!zqmc = sproductname rczq!date = datbrowse.recordset("fdate") rczq.update end if datbrowse.recordset.movenext loop datbrowse.recordset.movefirst rs.movefirst do while not rs.eof and rs!zqmc <> sproductname rs.movenext loop if rs.eof then answer = msgbox("match product not found.", vbokonly) else me.mousepointer = 11 if mskstartdate.cliptext = "" or mskenddate.cliptext = "" then msgbox "date is null" mskstartdate.setfocus me.mousepointer = 0 exit sub end if startdate = cdate(mskstartdate) enddate = cdate(mskenddate) daynumber = enddate - startdate + 1 rczq.movelast rczq.movefirst for i = 1 to rczq.recordcount if rczq!date > enddate then rczq.delete end if next i if rczq.recordcount = 0 then msgbox "no record!" me.mousepointer = 0 cmdok(0).enabled = false cmdprint(1).enabled = false exit sub end if redim dayfor1(1 to daynumber) as date redim opdate(1 to rczq.recordcount, 1 to daynumber) as long redim opdateid(1 to rczq.recordcount, 1 to daynumber) as long '日 for i = 1 to (rczq.recordcount) opdate(i, 1) = startdate - cdate(rczq("date")) if startdate > = cdate(rczq("date")) then for j = 1 to daynumber opdate(i, j) = opdate(i, 1) + j - 1 next j |
|
|
|
|