Results 1 to 4 of 4
  1. #1
    Bartolio is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2012
    Posts
    2

    Help with query

    The table STUDENT has 3 columns ID, Name, Hobby



    Soms cells from Hobby are empty, how do I make a query that shows the students that have no hobby?

    I thought it was something like this, but i don't know how to refer to the empty cell.

    SELECT Name, Hobby
    FROM STUDENT
    WHERE Hobby = " ";

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    WHERE Len(Hobby & "") = 0;
    ...or maybe WHERE IsNull(Hobby) = True;

  3. #3
    Bartolio is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2012
    Posts
    2
    It worked, Thanks!

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Excellent! Glad we could help.

Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums