help me making a query to find record with date plz?

DownTownBoy

New member
Private Sub cmdSearch_Click()

If Len(cboSearchField) = 0 Or IsNull(cboSearchField) = True Then
MsgBox "You must select a field to search."

ElseIf Len(txtSearchString) = 0 Or IsNull(txtSearchString) = True Then
MsgBox "You must enter a search string."
'End If
Else

'Generate search criteria
GCriteria = cboSearchField & " LIKE '*" & txtSearchString & "*'"

'Filter formMovie based on search criteria
Form_formMovie.RecordSource = "select * from tblMovie where " & GCriteria
Form_formMovie.Caption = "tblMovie (" & cboSearchField & " contains '*" & txtSearchString & "*')"


'Close formSearch
DoCmd.Close acForm, "formSearch"

MsgBox "Results have been filtered."

End If

End Sub
i want to extract the search via a sub form named form_formsearch of a main form named form_formMovie which is to gather information from a tblMovie from different fields as title, Director, genre, storyline, releasedate and dataentered date. this code work fine with every search except the release dates and date record entered.
 
Back
Top