|
7#
楼主 |
发表于 2006-6-15 20:34:00
|
只看该作者
值已经赋了。下面是原代码。
Dim PayDate As Date
PayDate = DLookup("ItermDate", "Iterm", "Order = " & DMax("[Order]", "Iterm", "Notes Like " & "'Pay the loan of Camry'"))
While Date >= DateAdd("m", 1, PayDate) And Date <= DateAdd("m", 36, "1/4/2006")
PayDate = DateAdd("m", 1, PayDate)
DoCmd.RunSQL "INSERT INTO Iterm ( Notes, SortOrder, Charges, ItermDate, Remark ) SELECT 'Pay the loan of Camry' AS Notes, " & OutlayID & " AS SortOrder, " & Payment & " AS Charges, " & Format(PayDate, "Short Date") & " AS ItermDate, " & Format(PayDate, "Short Date") & " AS Remark"
Wend |
|