J
JOSELUIS via AccessMonster.com
I have created a subform based on a query with a field TotalDays and this is
a calculated field:
Dim Totaldays As Integer
Dim DateIn As Date
Dim DateOut As Date
If DateOut Is Null Then
TotalDays=DifDate ("d",[DateIn],[Date])
Else
TotalDays=DifDate ("d",[DateIn],[DateOut])
End If
My questions are:Where is the best place to calculated the field in the
subform or in the query?
If the answer is in the subform in what event i have to put the code?
Thank you for your time.
a calculated field:
Dim Totaldays As Integer
Dim DateIn As Date
Dim DateOut As Date
If DateOut Is Null Then
TotalDays=DifDate ("d",[DateIn],[Date])
Else
TotalDays=DifDate ("d",[DateIn],[DateOut])
End If
My questions are:Where is the best place to calculated the field in the
subform or in the query?
If the answer is in the subform in what event i have to put the code?
Thank you for your time.