Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filtering to exclude a Null or zero length string

Status
Not open for further replies.

JamesBBB

Technical User
Nov 2, 2005
74
GB
Hi All,

Im fine with filtering records on a form where the record field has a value I can filter on, however, I'm having a little problem with filtering columns of records on a form where I would like like to filter "excluding" either NULL or zero length strings.

I would like to do this as in some records in the database, which have a nill or zero length string that I would like to exlude from the view.


I just cannot work out the code to exclude zero length strings or a NULL value, I have tried.

Can anyone help please.

I know I can right click the field and set "Filter excluding", but I would like to understand how to do it in code, its also better for the user.

many thanks

James
 
A starting point:
Trim(yourField & "") <> ""

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top