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:
If IsNull(Me.journal) Or Me.journal = vbNullString Then
ival = 1
msg = msg & "No journal given." & vbCrLf
Else
dum = Me.journal
If Len(Trim(dum)) < 1 Then
ival = 1
msg = msg & "No journal given." & vbCrLf
End If
If IsEmpty(Me.journal) Then
ival = 1
End If
If (Me.journal) = Null Then
ival = 7
End If
End If
Does someone now of another way to check on it, which returns the correct answer?:rolleyes:
Did not post this in chit chat but seems to become a chatsession
When you declare a string with a length.
VB Code:
Private mstr_journal As String * 3
vb fills them up with
all the test I am trying to see if someone filled it up doesn't work cause of them in it.
Someone with a answer how to test ??????
Little less conversation, little more action
Found it.
Thanks for those who helped me.