Results 1 to 6 of 6

Thread: RESOLVED Empty, Null, ??? STRING

Threaded View

  1. #1

    Thread Starter
    Frenzied Member swatty's Avatar
    Join Date
    Aug 2002
    Location
    somewhere on earth
    Posts
    1,478

    RESOLVED Empty, Null, ??? STRING

    Hi all,

    I am building classes to add and delete objects in the database.

    In my classes i've made a property for each field in the table.

    For the text fields i've used strings with the exact size of them.

    Now when i want to check on a string if it is empty this won't give me the right answer.

    Because my string is declared as String * 3, it is filled with 3 ???

    How can I check something was inserted in the property of the string ??
    This is how i try to check on it but all evaluations return false.
    VB Code:
    1. If IsNull(Me.journal) Or Me.journal = vbNullString Then
    2.       ival = 1
    3.       msg = msg & "No journal given." & vbCrLf
    4.    Else
    5.       dum = Me.journal
    6.       If Len(Trim(dum)) < 1 Then
    7.          ival = 1
    8.          msg = msg & "No journal given." & vbCrLf
    9.       End If
    10.       If IsEmpty(Me.journal) Then
    11.          ival = 1
    12.       End If
    13.       If (Me.journal) = Null Then
    14.          ival = 7
    15.       End If
    16.    End If

    Does someone now of another way to check on it, which returns the correct answer?
    Last edited by swatty; Aug 9th, 2002 at 04:00 AM.
    Code:
    If Question = Incomplete Then
       AnswerNextOne
    Else
       ReplyIfKnown
    End If
    cu Swatty

Posting Permissions

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



Click Here to Expand Forum to Full Width