Dear All,
With this vba I try to do a search with the date I get an error
What mistakes did I make
I use below VBA
With this vba I try to do a search with the date I get an error
What mistakes did I make
I use below VBA
Code:
Private Sub cmdSearch_Click()
Call Search
End Sub
Sub Search()
Dim strCriteria, task As String
Me.Refresh
If IsNull(Me.followupFrom) Or IsNull(Me.followupTo) Then
MsgBox "Enter date", vbInformation, "Date Range Required"
Me.followupFrom.SetFocus
Else
strcreteria = "([follow up] >= #" & Me.followupFrom & "# And [follow up] <= #" & Me.followupTo & "#)"
task = "Select * from qrySearch where (" & strCriteria & ") order by [follow_up]"
DoCmd.ApplyFilter task
End If
End Sub