Hello everyone,
I have a database to track employee training, and I have created the module below to find the lowest date from multiple fields. It is working well until the dates are from the previous year. Is there a way to include the previous years? Or please tell me what I did wrong.
Module format
Function FirstLow(D1, D2, D3)
D1 = Nz(D1, #1/1/2999#)
D2 = Nz(D2, #1/1/2999#)
D3 = Nz(D3, #1/1/2999#)
If D1 < D2 And D1 < D3 Then
FirstLow = D1
ElseIf D2 < D1 And D2 < D3 Then
FirstLow = D2
Else
FirstLow = D3
End If
Query
First: FirstLow([LandDate],[HoverDate],[DepDate])
Thank you for your time.
I have a database to track employee training, and I have created the module below to find the lowest date from multiple fields. It is working well until the dates are from the previous year. Is there a way to include the previous years? Or please tell me what I did wrong.
Module format
Function FirstLow(D1, D2, D3)
D1 = Nz(D1, #1/1/2999#)
D2 = Nz(D2, #1/1/2999#)
D3 = Nz(D3, #1/1/2999#)
If D1 < D2 And D1 < D3 Then
FirstLow = D1
ElseIf D2 < D1 And D2 < D3 Then
FirstLow = D2
Else
FirstLow = D3
End If
Query
First: FirstLow([LandDate],[HoverDate],[DepDate])
Thank you for your time.