IIf condition in criteria (1 Viewer)

alktrigger

Aimless Extraordinaire
Local time
Today, 07:15
Joined
Jun 9, 2009
Messages
124
I'm trying to create a query that will update as a textbox is filled, but if there is nothing in the textbox I want it to act as if there is no criteria

Code:
IIf(len([Forms].[frmMembers].[txtLastName]) > 0 , _
     InStr(1, Left([Forms].[frmMembers].[txtLastName,_
     len([Forms].[frmMembers].[txtLastName])), [COLOR=Red]ShowAll[/COLOR])

What do I replace ShowAll with?
 

Brianwarnock

Retired
Local time
Today, 12:15
Joined
Jun 2, 2003
Messages
12,701
You want the criteria to be based on what is in
[Forms].[frmMembers].[txtLastName]) or if that is null select all of the records?

Where yourfield = [Forms].[frmMembers].[txtLastName] or [Forms].[frmMembers].[txtLastName] is null

Brian
 

Users who are viewing this thread

Top Bottom