Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

emptyness in a label problem 2

Status
Not open for further replies.

virginie

Programmer
Jul 24, 2002
53
IL
i have a condition :
If commitdate = null Then
----
---
end if

commitdate is really empty label with null value
but it is not enter the if statement !
i try If commitdate = "" Then
but the result is the same

what can i do to check if there is a value in this label??
 
Is it something like

If commitdate = null then ""
else commitdate

? Learn something new every day *:->*
 
You could try using

If LenB(Label) > 0 Then
'Not null stuff
End If

of

If Label = vbNullString Then
'Null
End If

There are two ways to write error-free programs; only the third one works.
 
Hi

If commitdate is a label control, you need to test commitdate.Caption, if it is a textbox control then try If IsNull(commitdate), if it still doues not work, are you sure it does not contain a space? in which case try

if len(trim(Nz(commitdate,"")& "")) = 0 Then Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
thanks!!

i use IsNull(commitdate), and it works!
 
A star for you Ken! Learn something new every day *:->*
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top