I am so stuck. I use this function all the time to filter combo boxes and it works just great. I am trying to get it to filter the form itself and nadda, nothing.
Okay here is the form's row source
Here is the combo box
here is the function.
In theory when I select from the combo box it should filter the form.
I have tried Me.Requery and Me.Refresh but nothing I still get the complete record set.
When I put break in the function vCboSearch is ALWAYS null????? Yes I can use this very same module to filter a combo box for giving jobs in a division and bingo the box filters fine. Where am I goofing up???
Please help,
Thank you,
Okay here is the form's row source
Code:
SELECT qryrmt_Job_Descript.CO_NO,
qryrmt_Job_Descript.DIV_NO,
qryrmt_Job_Descript.JOB_NO, qryrmt_Job_Descript.DESCRIPT
FROM qryrmt_Job_Descript
WHERE (
((qryrmt_Job_Descript.DIV_NO) Like fCboSearch([Forms]![frm_Job_Test]![cbo_Div_No].[Value]))
);
Here is the combo box
Code:
SELECT DISTINCT
Job_Info.DIV_NO
FROM qryrmt_Job_Descript as Job_Info
UNION
Select "<Select All>"
FROM qryrmt_Job_Descript as Job_Info
ORDER BY 1;
here is the function.
Code:
Public Function fCboSearch(vCboSearch As Variant)
If IsNull(vCboSearch) Or vCboSearch = "" Or vCboSearch = "<Select All>" Then
fCboSearch = "*"
Else
fCboSearch = vCboSearch
End If
End Function
In theory when I select from the combo box it should filter the form.
I have tried Me.Requery and Me.Refresh but nothing I still get the complete record set.
When I put break in the function vCboSearch is ALWAYS null????? Yes I can use this very same module to filter a combo box for giving jobs in a division and bingo the box filters fine. Where am I goofing up???
Please help,
Thank you,