Here's another alternative ---
Put the following expression in the criteria:
[Forms]![FindData]![txtUID] Or ([Forms]![FindData]![txtUID] Is Null)
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
Over 1150 users have come to me from the newsgroups requesting help
resource@pcdatasheet.com
"Jim" <jlrehmann@gmail.com> wrote in message
news:1142718993.162016.6730@e56g2000cwe.googlegrou ps.com...[color=blue]
>I have a form named FindData that has a field on it named txtUID. If a
> person types in an ID and clicks the search button, I want the query to
> find all the records in the table MAIN that have the matching ID in a
> column named "UserID"... no problem there. If they don't key in an ID
> on the form, I want it to find all the records in the table MAIN that
> have something entered into the "UserID" field, but omit the records
> that have blank UserID fields...
>
> I've tried dozens of alternatives in the query builder
>
> This is what's under the UserID field in the query:
>
> IIf([Forms]![FindData]![txtUID] Is Null,Not Is
> Null,[Forms]![FindData]![txtUID])
>
> Help.
>[/color]