H
heidii
Hello:
I am very new to writing code and the code I am using I have gathered
from these newsgroups and the web.
I have the following code in placed under the OnClick even of my
command button on a continuous form:
Private Sub CMDSEARCH_Click()
Me.Filter = "([YEAR] Like '*" & cboYEAR & "')And " & _
"([MAKE] Like '*" & cboMAKE & "') And " & _
"([Model] Like '*" & cboMODEL & "') And " & _
"([COLOR] Like '*" & cboCOLOR & "') And " & _
"([Description] Like '*" & cboDESCRIPTION & "') And " & _
"([License] Like '*" & cboLIC & "') And " & _
"([Location] Like '*" & cboLOCATION & "') And " & _
"([Driver Name] Like '*" & cboDRIVER & "') And " & _
"([TYPE] Like '*" & cboTYPE & "') And " & _
"([STATUS] Like '*" & cboSTATUS & "') And " & _
"([VIN] Like '*" & cboVIN & "') "
Me.FilterOn = True
End Sub
and I have the following code under another command button on the same
form to refresh the search combo boxes:
Private Sub CMDREFRESH_Click()
Me.FilterOn = True
Me.cboMAKE = ""
Me.cboYEAR = ""
Me.cboCOLOR = ""
Me.cboVIN = ""
Me.cboSTATUS = ""
Me.cboTYPE = ""
Me.cboDESCRIPTION = ""
Me.cboDRIVER = ""
Me.cboLIC = ""
Me.cboLOCATION = ""
Me.cboMODEL = ""
DoCmd.ShowAllRecords
Requery
End Sub
Both of these work great, except after I enter my search criteria in
the combo boxes and hit my command button, my return record results do
not include records where one of the columns has a null value.
Example:
I put in 2002 for the Year Combo box, and then click my Search command
button. Only the 2002 vehicles that have all the fields filled in
return. But there are records that have 2002 for the vehicle year
with no color entered. How do I get those records to show up.
Thanks Heidi
I am very new to writing code and the code I am using I have gathered
from these newsgroups and the web.
I have the following code in placed under the OnClick even of my
command button on a continuous form:
Private Sub CMDSEARCH_Click()
Me.Filter = "([YEAR] Like '*" & cboYEAR & "')And " & _
"([MAKE] Like '*" & cboMAKE & "') And " & _
"([Model] Like '*" & cboMODEL & "') And " & _
"([COLOR] Like '*" & cboCOLOR & "') And " & _
"([Description] Like '*" & cboDESCRIPTION & "') And " & _
"([License] Like '*" & cboLIC & "') And " & _
"([Location] Like '*" & cboLOCATION & "') And " & _
"([Driver Name] Like '*" & cboDRIVER & "') And " & _
"([TYPE] Like '*" & cboTYPE & "') And " & _
"([STATUS] Like '*" & cboSTATUS & "') And " & _
"([VIN] Like '*" & cboVIN & "') "
Me.FilterOn = True
End Sub
and I have the following code under another command button on the same
form to refresh the search combo boxes:
Private Sub CMDREFRESH_Click()
Me.FilterOn = True
Me.cboMAKE = ""
Me.cboYEAR = ""
Me.cboCOLOR = ""
Me.cboVIN = ""
Me.cboSTATUS = ""
Me.cboTYPE = ""
Me.cboDESCRIPTION = ""
Me.cboDRIVER = ""
Me.cboLIC = ""
Me.cboLOCATION = ""
Me.cboMODEL = ""
DoCmd.ShowAllRecords
Requery
End Sub
Both of these work great, except after I enter my search criteria in
the combo boxes and hit my command button, my return record results do
not include records where one of the columns has a null value.
Example:
I put in 2002 for the Year Combo box, and then click my Search command
button. Only the 2002 vehicles that have all the fields filled in
return. But there are records that have 2002 for the vehicle year
with no color entered. How do I get those records to show up.
Thanks Heidi