Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2009
    Posts
    89

    Unanswered: Any function that looks for Null and ""?

    Hi. I've got a form that enters values in a table. If the field is left blank then the form uses "".

    Now I want to check for fields that are blank. IsNull and Nz() work for most of them, but some have empty fields with "" in them. (e.g. if i do IIf([name]="".. then it finds them.

    Is there any function that can test for "" or Null values?

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    IIf(NZ([name], vbNullString)=vbNullString
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    I also use

    IIF(len([MyFieldName]) > 0,"not blank", "is blank") - for a query.

    or

    if len(Forms!MyFormName!MyFieldName) > 0 then... - for code.
    Last edited by pkstormy; 06-20-09 at 11:31.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •