|
-
March 25th, 2004, 12:10 AM
#1
If statement not providing correct result
I have got myself into trouble, but don't understandd what could be the problem.
I have an if statement that does not follow the condition test?
In my recordset I have a field that contains either the word "Withdrawn" or is null.
I assigned this to a string before applying the if statement.
The code is :
If rs.Fields("withdrawnprize").Value <> "" Then
wstatus = rs.Fields("withdrawnprize").Value & " "
MsgBox " rs withdrawnprize is not <> null "
Else
wstatus = ""
End If
If wstatus = "Withdrawn" Then
MsgBox " withdrawnprize record found **** "
chkExpired.Value = 1
Else
chkExpired.Value = 0
MsgBox " what is going on here wstatus " & wstatus
End If
The msgboxs show the recordset column and the string to contain the word Withdrawn , the If statement always branches to the else code?
Can anyone see how I have miss coded this IF logic?
TT
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|