InspectorHound
Programmer
Hi,
I am building an SQL query string and I need to add a part that restricts field value to be between a start and an end date. Is this right:
If Not (IsNull(Me.txtStart) Or IsNull(Me.txtEnd)) Then
strSQL = strSQL & " AND [Authorized Travel Begin Date]>=" & Format (Me.txtStart, "dd/mm/yyyy") & _
"[Authorized Travel Begin Date]<=" & Format(Me.txtEnd, "dd/mm/yyyy")
End If
I am building an SQL query string and I need to add a part that restricts field value to be between a start and an end date. Is this right:
If Not (IsNull(Me.txtStart) Or IsNull(Me.txtEnd)) Then
strSQL = strSQL & " AND [Authorized Travel Begin Date]>=" & Format (Me.txtStart, "dd/mm/yyyy") & _
"[Authorized Travel Begin Date]<=" & Format(Me.txtEnd, "dd/mm/yyyy")
End If