Hi
I am new at this could someone point me in the right direction
[CODE=VB]
Private Sub cmdSearch_Click ()
If Len(cboSearchFi eld) = 0 Or IsNull(cboSearc hField) = True Then
MsgBox "You must select a field to search."
ElseIf Len(txtSearchSt ring) = 0 Or IsNull(txtSearc hString) = True Then
MsgBox "You must enter a search string."
Else
GCriteria = cboSearchField. Value & " LIKE '*" & txtSearchString & "*'"
Form_frmDVDProg rams1.RecordSou rce = "select * from DVDPrograms where " & GCriteria
Form_frmDVDProg rams1.Caption = "DVDProgram s (" & cboSearchField. Value & " contains '*" & txtSearchString & "*')"
DoCmd.Close acForm, "frmSearch"
MsgBox "Results have been filtered."
End If
End Sub
[/CODE]
Problem with the line
[CODE=VB]
Form_frmDVDProg rams1.RecordSou rce = "select * from DVDPrograms where " & GCriteria
[/CODE]
I am new at this could someone point me in the right direction
[CODE=VB]
Private Sub cmdSearch_Click ()
If Len(cboSearchFi eld) = 0 Or IsNull(cboSearc hField) = True Then
MsgBox "You must select a field to search."
ElseIf Len(txtSearchSt ring) = 0 Or IsNull(txtSearc hString) = True Then
MsgBox "You must enter a search string."
Else
GCriteria = cboSearchField. Value & " LIKE '*" & txtSearchString & "*'"
Form_frmDVDProg rams1.RecordSou rce = "select * from DVDPrograms where " & GCriteria
Form_frmDVDProg rams1.Caption = "DVDProgram s (" & cboSearchField. Value & " contains '*" & txtSearchString & "*')"
DoCmd.Close acForm, "frmSearch"
MsgBox "Results have been filtered."
End If
End Sub
[/CODE]
Problem with the line
[CODE=VB]
Form_frmDVDProg rams1.RecordSou rce = "select * from DVDPrograms where " & GCriteria
[/CODE]
Comment