vb6中的CSQL代码用于在两个日期之间显示数据?

时间:2017-10-30 05:43:54

标签: sql vb6

Set COUNTER_RS = New Recordset
    COUNTER_RS.Open "Select * from TT_COUNTER where Trans_dt >'" + Format(mskFdate.Text, "mm-dd-yyyy") + "' and Trans_dt <='" + Format(mskTdate.Text, "mm-dd-yyyy") + "'  and Receipt_No like 'A%' and Head_Details='MED' order by Receipt_No", db, adOpenStatic, adLockOptimistic
    MEDI = 0
If COUNTER_RS.RecordCount > 0 Then
    While COUNTER_RS.EOF = False
        MEDI = Val(COUNTER_RS!Rate)
        COUNTER_RS.MoveNext
    Wend
End If

无法在两个日期之间找到正确的金额,请帮忙查看代码?

image

0 个答案:

没有答案