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
无法在两个日期之间找到正确的金额,请帮忙查看代码?