May 24, 2006 #1 coder30 Programmer Joined Apr 7, 2006 Messages 16 Location US I am trying to check 25 fields for null values is there a way to say... "iif([fieldeG] through [fieldZ]is null,1,0)
I am trying to check 25 fields for null values is there a way to say... "iif([fieldeG] through [fieldZ]is null,1,0)
May 24, 2006 #2 lespaul Programmer Joined Feb 4, 2002 Messages 7,083 Location US no, you will need to write each one individually. Is your table committing spreadsheet? Leslie Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual Essential reading for anyone working with databases: The Fundamentals of Relational Database Design Upvote 0 Downvote
no, you will need to write each one individually. Is your table committing spreadsheet? Leslie Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual Essential reading for anyone working with databases: The Fundamentals of Relational Database Design
May 24, 2006 #3 Remou Technical User Joined Sep 30, 2002 Messages 13,030 Location BE What did you want to use? A form or a recordset? For example: Code: For Each fld In rs.Fields If IsNull(fld) Then Debug.Print "Is Null" Else Debug.Print "Is Not Null" End If Next Upvote 0 Downvote
What did you want to use? A form or a recordset? For example: Code: For Each fld In rs.Fields If IsNull(fld) Then Debug.Print "Is Null" Else Debug.Print "Is Not Null" End If Next
May 24, 2006 Thread starter #4 coder30 Programmer Joined Apr 7, 2006 Messages 16 Location US Thanks leslie. Remou - that would work if the fields were truly null, but I've just discovered some of the fields contain spaces, so they aren't truly null. Upvote 0 Downvote
Thanks leslie. Remou - that would work if the fields were truly null, but I've just discovered some of the fields contain spaces, so they aren't truly null.
May 25, 2006 #5 JerryKlmns IS-IT--Management Joined Feb 7, 2005 Messages 2,062 Location GR How about UPDATE myTable SET myField = Trim(myField) to get rid of only-space fields and get NULL? Upvote 0 Downvote
May 25, 2006 #6 Remou Technical User Joined Sep 30, 2002 Messages 13,030 Location BE You will often see Trim(Field & " ") = "" used in these fora as it test for null, spaces and zero length strings. Upvote 0 Downvote
You will often see Trim(Field & " ") = "" used in these fora as it test for null, spaces and zero length strings.
May 25, 2006 Thread starter #7 coder30 Programmer Joined Apr 7, 2006 Messages 16 Location US Thanks!... I think that will work! Upvote 0 Downvote