读书人

db.Search获取2个时间段内的数据解决方

发布时间: 2012-03-26 15:46:56 作者: rapoo

db.Search获取2个时间段内的数据
searchFormula$={select form= "(SysInfoPublish_Form)" & @text(ReleaseDate)> = "}+doc.StartDate(0)+{ "& @text(ReleaseDate) <= "}+doc.EndDate(0)+{"}
Set dcc=db.Search(searchFormula$,Nothing,0)
If dcc.Count> 0 Then
Set doc=dcc.GetFirstDocument
While Not(doc Is Nothing)
Msgbox "这里是一些文档的操作 "
Set doc = dcc.GetNextDocument(doc)
Wend
End If


错误号4005:Notes error: Formula Error (select form= "(SysInfoPublish_Form)" & @text(ReleaseDate)> = "2010-11-16 "& @text(ReleaseDate) <= "2010-11-16")
第一行报错

[解决办法]
那个"> ="的写法错误, 应该是">="

读书人网 >行业软件

热点推荐