jackie77
Jackie
- Local time
- Today, 22:26
- Joined
- Jul 18, 2007
- Messages
- 85
Hi all
I am still having problems adapting the search code placed, very kindly on this forum by Gromit. When I run the search none of the results populate even when I know there is a match
The code I am using is
Can any one help as I seem to be getting no where with this, as you can probably tell am new to all this
Any advise would be most appricated
Thanks
Jackie
I am still having problems adapting the search code placed, very kindly on this forum by Gromit. When I run the search none of the results populate even when I know there is a match
The code I am using is
Code:
Private Sub Form_Load()
' Clear the search form
btnClear_Click
End Sub
Private Function BuildFilter() As Variant
Dim varWhere As Variant
Dim varItem As Variant
Dim intIndex As Integer
varWhere = Null ' Main filter
' Check for LIKE Booked Date
If Me.txtBooked_Date > "" Then
varWhere = varWhere & "[BookedDate] Like """ & Me.txtBooked_Date & " * "" And "
End If
' Check for Engineer
If Me.cmbEngineer > 0 Then
varWhere = varWhere & "[Engineer] = " & Me.cmbEngineer & " And "
End If
' Check if there is a filter to return...
If IsNull(varWhere) Then
varWhere = ""
Else
varWhere = "WHERE " & varWhere
' strip off last "AND" in the filter
If Right(varWhere, 5) = " AND " Then
varWhere = Left(varWhere, Len(varWhere) - 5)
End If
End If
BuildFilter = varWhere
End Function
Can any one help as I seem to be getting no where with this, as you can probably tell am new to all this
Any advise would be most appricated
Thanks
Jackie