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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Null and Non null

Status
Not open for further replies.

pleg12345

IS-IT--Management
Dec 21, 2003
48
EU
Hi, im producing a user input search criteria.

For the initial criteria i used the like operator:
Like "*" & [parameter]& "*"

However.. This does not return Null values in other fields

For e.g. I have a custname field which always contains data
I also have a feedback field which in some cases may be null.

I resolved the problem by entering the following in the feedback criteria:
(Like [parameter] & "*") Or Null

However i now have another problem.....
When i do a search on the feedback criteria, it will bring up both null and non null records. I obviously just want it to display the users stated criteria.


Can somebody please help
 
Just had a wild thought:
Have a go with
(Like [parameter] & "*") Or [parameter]

If the parameter is Null, it's the same as before.
But if it isn't, Null values would be excluded. ;-)

Andreas Galambos
EDP / Technical Support Specialist
(andreas.galambos@bowneglobal.de)
HP:
 
Unfortunately that doesnt bring up null values when entering a different criteria!

im tearing my hair out with this ! ha ha
 
Could you use the NZ function on your field?

e.g.
... WHERE NZ(MyField,"") LIKE [Parameter] & "*"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top