Hi,
In the After Update, or Before Insert event of the second field, put this code:
Dim dtCallBooked As Date
Dim dtCallComplete As Date
Dim iDays As Integer
dtCallBooked = Me.Date_of_Call_Booked ' never use spaces in field names - Access will insert underscores in control names.
dtCallComplete = Me.Date_of_Call_Completed
iDays = DateDiff(dtCallComplete - dtCallBooked) 'I think that is right, or reverse the order
Me.No_of_Days = iDays
That should work. Let me know if it doesn't.
mmcdonal
|