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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can Somebody tell me why?

Status
Not open for further replies.

dormingo

MIS
Mar 2, 2006
12
MY
fremark=""

do while not rsdoc.EOF
if trim(rsdoc.Fields("fsourcedocno"))=trno then 'Cod1
fremark=fremark&","&rsdoc.Fields("fsourcedocno")
else
if fremark<>"" then 'Cod2
response.Write("Hello, how are you")
response.end
end if
fremark=rsdoc.Fields("fsourcedocno")

end if
rsdoc.movenext
loop


Why I cann't get the "Hello, how are you" message if the Condition 1 is false? Can somebody help me to solve it Or change the logic inside..I think the fremark is not a empty string..
 
If condition1 is met, condition2 will never be test. Change the "else" to "end if" and take out the last "end if" before the movenext. (Are you seriously working with that kind of indents?!)
 
The only time "condition 2" has a chance to be True is before any loop iteration where "condition 1" is True... because once #1 is True then "fremark" will contain some characters and no longer be an empty string.

PS: What are you actually trying to accomplish?
 
Thank you guys. I had got the answer. Is my logic thinking problems.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top