B
Bongard
Hi, I have a TEXT field in my query whose criteria is a Function
NodeFilter(). This function looks to a form that allows the user to
fill in data and then runs the query. When the user enters criteriea
the Function works just fine and the query is run successfully.
However when the user leaves this field ([NodeF]) on the form blank I
cannot get the query to run successfully without any criteria in the
Node field. I continue to get 0 results on my query if the criteria is
left blank
Here is my function being passed as the query's criteria:
Function NodeFilter()
If IsNull([Forms]![frm_EditMaxMVCF]![Nodef]) Then
GoTo EndSub
Else: NodeFilter = [Forms]![frm_EditMaxMVCF]![Nodef]
End If
Exit Function
EndSub:
NodeFilter = isnull([Forms]![frm_EditMaxMVCF]![NodeF])
End Function
When the field is left blank it does come out as isnull() and in VB as
I step through the function it runs down to the "EndSub:" but the
query doesn't like and of the criteria I feed it. Besides "NodeFilter
= isnull([Forms]![frm_EditMaxMVCF]![NodeF])" I have also tried the
following:
NodeFilter = ""
NodeFilter = 0
Any help or suggestions would be much appreciated!
-Brian
NodeFilter(). This function looks to a form that allows the user to
fill in data and then runs the query. When the user enters criteriea
the Function works just fine and the query is run successfully.
However when the user leaves this field ([NodeF]) on the form blank I
cannot get the query to run successfully without any criteria in the
Node field. I continue to get 0 results on my query if the criteria is
left blank
Here is my function being passed as the query's criteria:
Function NodeFilter()
If IsNull([Forms]![frm_EditMaxMVCF]![Nodef]) Then
GoTo EndSub
Else: NodeFilter = [Forms]![frm_EditMaxMVCF]![Nodef]
End If
Exit Function
EndSub:
NodeFilter = isnull([Forms]![frm_EditMaxMVCF]![NodeF])
End Function
When the field is left blank it does come out as isnull() and in VB as
I step through the function it runs down to the "EndSub:" but the
query doesn't like and of the criteria I feed it. Besides "NodeFilter
= isnull([Forms]![frm_EditMaxMVCF]![NodeF])" I have also tried the
following:
NodeFilter = ""
NodeFilter = 0
Any help or suggestions would be much appreciated!
-Brian