something is not right with these code the Is True Then , pls help me to correct it....


If isEmpty(Mfgno) Is True Then
lbl1.Caption = "Error"

Else
lbl1.Caption = "NoError"
End If

Debug.Print (Mfgno)

Recommended Answers

All 3 Replies

Hi,

What type of Variable is "Mfgno"...?
If String Check for "" If Numeric check for Zero:

If Trim(MfgNo) ="" Then
  lbl1.Caption = "Error
Else
  lbl1.Caption = "NoError
End If

Regards
Veena

Is True is not available in VB 6.0 .

Are you using .NET ?

thnx both of you....

im using string and VB 6.0 , currently im using this method which is not so good

If Mfgno = " " Then lbl1.Caption = "Error line=" & line
If CardTran = " " Then lbl1.Caption = "Error line=" & line
If TranType = " " Then lbl1.Caption = "Error line=" & line
If TranDate = " " Then lbl1.Caption = "Error line=" & line
If DrCrFlag = " " Then lbl1.Caption = "Error line=" & line

i've to count the no of each substring to do this..... anyway thanx... i'm gonna try wat's veena suggest....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.