IS null

G

Guest

I have a continuous form based on a query. In the form header, I have unbound
textboxes relating to the controls in the continuous form. The parameters for
the query are the values in the unbound controls. This all works as expected.

In order to avoid nulls, I havent put IS null criteria in the query.this
gives precise results. however there are many records which have info in one
field (say post code) and no in other (say last name)
this records are not displayed.

IF I take the is null criteria, then the search displays huge lists.

IS there a way around this?

I have the sql below

SELECT uniquew.[Supporter No], uniquew.[Post Code], uniquew.[Last Name],
uniquew.[First Name]
FROM uniquew
WHERE (((uniquew.[Supporter No]) Like [Forms]![main]![Text20] & "*") AND
((uniquew.[Post Code]) Like [Forms]![main]![Text15] & "*") AND
((uniquew.[Last Name]) Like "*" & [Forms]![main]![Text31] & "*") AND
((uniquew.[First Name]) Like "*" & [Forms]![main]![Text45] & "*"));
 
G

Guest

Try using your Is Not Null as an OR statement. If you are using the Query
Design window, simply add Is Not Null, on separate criteria lines, in each
column you want to filter by.

Good luck.

Sharkbyte
 
G

Guest

thanks

that doesnt do anything. infact the query displays all records without blanks



Sharkbyte said:
Try using your Is Not Null as an OR statement. If you are using the Query
Design window, simply add Is Not Null, on separate criteria lines, in each
column you want to filter by.

Good luck.

Sharkbyte





flow23 said:
I have a continuous form based on a query. In the form header, I have unbound
textboxes relating to the controls in the continuous form. The parameters for
the query are the values in the unbound controls. This all works as expected.

In order to avoid nulls, I havent put IS null criteria in the query.this
gives precise results. however there are many records which have info in one
field (say post code) and no in other (say last name)
this records are not displayed.

IF I take the is null criteria, then the search displays huge lists.

IS there a way around this?

I have the sql below

SELECT uniquew.[Supporter No], uniquew.[Post Code], uniquew.[Last Name],
uniquew.[First Name]
FROM uniquew
WHERE (((uniquew.[Supporter No]) Like [Forms]![main]![Text20] & "*") AND
((uniquew.[Post Code]) Like [Forms]![main]![Text15] & "*") AND
((uniquew.[Last Name]) Like "*" & [Forms]![main]![Text31] & "*") AND
((uniquew.[First Name]) Like "*" & [Forms]![main]![Text45] & "*"));
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Is Null 2
wildcards 1
Criteria from Form 3
Update field with another one 1
Access 2003 vs 2010 1
VBA - Easy Question 7
Help with "Like" in a query 6
MS Office cant find object "DoCmd" 27

Top