Hi me again, last problem this time thoough! :¬)
One table of my database is called Loans, and the fields in question here are
Return Date and Days Late. Basically, what I want is the days late to be worked
out automatically from return date. The user enters the return date in a form
(Add Loan) when creating a new loan. The code that works out the days late will
have to be called whenever the database opens, which I don't know how to do.
What code would I have to use and where would i put it? Also, if the return
date is greater than todays date, i just want days late to be 0. I know in
pseudo code it would be something like
while there are more records
Dim DateDifference As Integer
If ([Return Date] >= Now()) Then
DateDifference = 0
Else
DateDifference = DateDiff("y", [Return Date], Now())
End If
endwhile
Loans.[Days Late] = DateDifference
something like this, I haven't learnt much coding though and this is just what
I have managed to get together from the help files
Thanx for any help, my teacher told me to ask here because he wasn't sure
either.
Donovan