Access query criteria

schalkse

Registered User.
Local time
Today, 19:34
Joined
Apr 20, 2005
Messages
51
Hi,

I have a query in access with several fields made with the query builder. I want all fields to have criteria so users can filter out only those that they want to see.
But it needs to be only showing what was selected (in listboxes) as criteria or show all records when no criteria is selected.

I know it has something to do with Is Null.... but cant remember how it needs to be.
Currently my criteria is [Forms]![frmArtikelBeheer]![klTypeArt] or [Forms]![frmArtikelBeheer]![klTypeArt] Is Null

anyone a clue how to do this?

Thanks
 
Last edited:
[Forms]![frmArtikelBeheer]![klTypeArt] or [Forms]![frmArtikelBeheer]![klTypeArt] Is Null

Means that the field will have to be equal to the value on the form OR the value on the form must be empty (NULL)

Does that answer your question?
 
[Forms]![frmArtikelBeheer]![klTypeArt] or [Forms]![frmArtikelBeheer]![klTypeArt] Is Null

Means that the field will have to be equal to the value on the form OR the value on the form must be empty (NULL)

Does that answer your question?

Nope. How do i get it either to show only those records that equal [klTypeArt] or when nothing is selected in that listbox to show all records?
 
By doing exactly that what you allready have... ???
Maybe you have to add
Or [Forms]![frmArtikelBeheer]![klTypeArt] = "" for text
or [Forms]![frmArtikelBeheer]![klTypeArt] = 0 for a number field.

But what you have should work.
 
By doing exactly that what you allready have... ???
Maybe you have to add
Or [Forms]![frmArtikelBeheer]![klTypeArt] = "" for text
or [Forms]![frmArtikelBeheer]![klTypeArt] = 0 for a number field.

But what you have should work.

Nope, only returns either nothing or what i select :(
 
Do you have other criteria also? Or just this one?

Can you post your DB? It should just work like it is... ( I think )
 
Hi I want to add that I have this same problem, and it does not work.

When both values are null it outputs everything, but when 1 value is null then it outputs nothing.


edit - I just want to add that I'm using Access 2003 if it makes any difference.
 

Users who are viewing this thread

Back
Top Bottom