Say your field name is [CustName],
use alias name of CustName1:[CustName] in your query
In its criteria cell under it add:
IIF(fnCustName1()="<All
In a module, add:
Function fnCustName1() As Variant
On Error GoTo 10
Dim Temp
Temp=Nz(Forms!MyFormNa
Msgbox Temp ' remove this line after you make sure its value is being read correctly
fnCustName1=Temp
ExitFunction
10:
fnCustName1
End Function
Also try changing
IIF(fnCustName1()="<All>",[C
to
IIF(fnCust
One of them should work. Now, after you test it for your first text bos, build yoyr second, third, and fourth on in a similar mannaer. I will show the second one. Add them one at a time.
txtCustName2 ' on your form
Alias name of CustName2:[CustName] in your query
IIF(fnCustName2()="<Al
Function fnCustName1() As Variant
On Error GoTo 10
Dim Temp
Temp=Nz(Forms!MyFormNa
fnCustName1=Temp
ExitFunction
10:
fnCustName1
End Function
in a module.
Mike
Main Topics
Browse All Topics





by: peter57rPosted on 2009-08-07 at 09:13:12ID: 25044291
([Forms]![z filter]![a] Or [Forms]![z filter]![a] Is Null )
and
( [Forms]![z filter]![b] or [Forms]![z filter]![b] Is Null )
and
([Forms]![z filter]![c] or [Forms]![z filter]![c] Is Null )
and
([Forms]![z filter]![d] or [Forms]![z filter]![d] Is Null)