supermaestro
Programmer
Hi
I'm developing a database for an Accountants form. They need a Year End field whichis essentially dd/mm i.e 01/02 for Feb 1st. Basically how can I search for date ranges using just day and month without the year? I know that the following works with the year added but need to use it without the year:
If Not IsNull(Me.Year_End_From) Then
strWhere = strWhere & " (contacts.[Year End] >= #" & Format(Me.Year_End_From, "mm/dd/yyyy"
& "#) AND"
End If
If Not IsNull(Me.Year_End_To) Then
strWhere = strWhere & " (contacts.[Year End] <= #" & Format(Me.Year_End_To, "mm/dd/yyyy"
& "#) AND"
End If
Can anybody help. Would I also have to make the field 'Year End' in my contacts table equal to text rather than date/time has it is at present?
I'm developing a database for an Accountants form. They need a Year End field whichis essentially dd/mm i.e 01/02 for Feb 1st. Basically how can I search for date ranges using just day and month without the year? I know that the following works with the year added but need to use it without the year:
If Not IsNull(Me.Year_End_From) Then
strWhere = strWhere & " (contacts.[Year End] >= #" & Format(Me.Year_End_From, "mm/dd/yyyy"
End If
If Not IsNull(Me.Year_End_To) Then
strWhere = strWhere & " (contacts.[Year End] <= #" & Format(Me.Year_End_To, "mm/dd/yyyy"
End If
Can anybody help. Would I also have to make the field 'Year End' in my contacts table equal to text rather than date/time has it is at present?