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

Microsoft access - not null

Status
Not open for further replies.

azaadin

Technical User
May 9, 2006
2
AU
I’m creating a database of families, some with children and some without. I’m trying to create a query which will allow me to view all the families with children without the other families appearing. I have tried entering as the criteria for children ‘is not null’, but no families appear when I do this. Can you advise of what I should do?

(from an inexperienced programmer)
 
Have you tried:
Code:
<>''
as the criteria form the children?

Hope this helps

HarleyQuinn
---------------------------------
Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
what determines if a family has children?

what is the sql you have currently to pull everyone up?

the syntax I use to check for nulls is: isnull(fieldName)

--------------------
Procrastinate Now!
 
Crowley16 said:
what determines if a family has children?
Haha [smile]


The is not null should work fine, as it's returning all of the OP's records I was thinking that the children's records aren't actually NULL, hence using the criteria I mentioned.

HarleyQuinn
---------------------------------
Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
I was thinking maybe there is a join on children and family or something similar...

--------------------
Procrastinate Now!
 
Ah right, sorry about that. Completely missed your point there...[blush]

HarleyQuinn
---------------------------------
Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
I was only trying to cover all possibilities, most likely it's just a field or something like that since he's using a null test on what seems to be a field...

--------------------
Procrastinate Now!
 
Yeah, hopefully the OP will get back to us and tell us as per your original request...

HarleyQuinn
---------------------------------
Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
It was all my bad. The 'is not null' is now working. The database wasnt saving the children properly so there were no records to pull up. I've hopefully got it solved now so I wont have stupid problems and questions..... (depressing that it was such a simple thing and I missed it before. Hopefully I'll work it out next time...)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top