hi,
i am having an issue now on forum comparing dates, now issue is this
Table Name is Transaction
Fields are ID, CuDate, DaysEmpty, and some more.
now i have a form for that table, user enters the date, and some more info, what i need is, i must have the MAX date from the table, and then check the diff between MAX date and Date entered on forum, and then put the number of days in field called DaysEmpty.
so here is what i did
Code:
Private Sub CuDate_BeforeUpdate(Cancel As Integer)
Dim LDate As String
LDate = DMax("[CuDate]", "Transaction", "")
End Sub
so that brings me the MAX date from the table before the date from form, now after entering date from form here is the code
Code:
Private Sub CuDate_AfterUpdate()
Dim HDays As Integer
HDays = LDate - Me.CuDate
Me.DaysEmpty= HDays
End Sub
i get an overflow error
can someone have an idea how i can get that done?