J
Jacinda
Hi, I was hoping someone could help me out with a code I am writing…. I got
this code from the Issues database template available from Microsoft. I
adopted the code into our database for the most part, but I can not seem to
get the date part of this code to work:
' If Opened Date From
If IsDate(Me.OpenedDateFrom) Then
' Add it to the predicate - exact
strWhere = strWhere & " AND " & "Issues.[Opened Date] >= " &
GetDateFilter(Me.OpenedDateFrom)
ElseIf Nz(Me.OpenedDateFrom) <> "" Then
strError = cInvalidDateError
End If
' If Opened Date To
If IsDate(Me.OpenedDateTo) Then
' Add it to the predicate - exact
strWhere = strWhere & " AND " & "Issues.[Opened Date] <= " &
GetDateFilter(Me.OpenedDateTo)
ElseIf Nz(Me.OpenedDateTo) <> "" Then
strError = cInvalidDateError
End If
I realize that “GetDateFilter†is something I have to set… but I’m not
sure where to put the following code…
Function GetDateFilter(dtDate As Date) As String
Please, any help you can give me would be great
this code from the Issues database template available from Microsoft. I
adopted the code into our database for the most part, but I can not seem to
get the date part of this code to work:
' If Opened Date From
If IsDate(Me.OpenedDateFrom) Then
' Add it to the predicate - exact
strWhere = strWhere & " AND " & "Issues.[Opened Date] >= " &
GetDateFilter(Me.OpenedDateFrom)
ElseIf Nz(Me.OpenedDateFrom) <> "" Then
strError = cInvalidDateError
End If
' If Opened Date To
If IsDate(Me.OpenedDateTo) Then
' Add it to the predicate - exact
strWhere = strWhere & " AND " & "Issues.[Opened Date] <= " &
GetDateFilter(Me.OpenedDateTo)
ElseIf Nz(Me.OpenedDateTo) <> "" Then
strError = cInvalidDateError
End If
I realize that “GetDateFilter†is something I have to set… but I’m not
sure where to put the following code…
Function GetDateFilter(dtDate As Date) As String
Please, any help you can give me would be great