thatelvis
asked on
BOF or EOF
Hello,
I have a small problem and would be grateful for some help.
<% If cint(Recblockblockunblocki f_else.Fie lds.Item(" worker_uid ").Value) = cint(Session("pt_login_id" ))
AND cint(Recblockblockunblocki f_else.Fie lds.Item(" blocker_id ").Value) = cint(RecmostofDuser.Fields .Item("id_ usr").Valu e) Then %>
<h1>free and open</h1><% Else %>this user is blocked <% End If %>
The above works if Recblockblockunblockif_els e is not empty, but when it is empty I get a Either BOF or EOF is True error, what can I do to it to work if there is no record.
regards and thanks for any help
Kenny
I have a small problem and would be grateful for some help.
<% If cint(Recblockblockunblocki
AND cint(Recblockblockunblocki
<h1>free and open</h1><% Else %>this user is blocked <% End If %>
The above works if Recblockblockunblockif_els
regards and thanks for any help
Kenny
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi again, Sorry I jumped the gun a little
the code you helped me with below. I only want one else, where as if the recordset is not empty and has the two values then <h1>free and open</h1><% Else %>this user is blocked , below you gave me 2 elses, how can I modift it to have only the one else. thanks again.
Kenny
<%
If Recblockblockunblockif_els e.EOF = false then
If cint(Recblockblockunblocki f_else.Fie lds.Item(" worker_uid ").Value) = cint(Session("pt_login_id" ))
AND cint(Recblockblockunblocki f_else.Fie lds.Item(" blocker_id ").Value) = cint(RecmostofDuser.Fields .Item("id_ usr").Valu e) Then %>
<h1>free and open</h1><% Else %>this user is blocked
<%
End If
else
%>
<b>No record to display</b>
<%
End if
%>
the code you helped me with below. I only want one else, where as if the recordset is not empty and has the two values then <h1>free and open</h1><% Else %>this user is blocked , below you gave me 2 elses, how can I modift it to have only the one else. thanks again.
Kenny
<%
If Recblockblockunblockif_els
If cint(Recblockblockunblocki
AND cint(Recblockblockunblocki
<h1>free and open</h1><% Else %>this user is blocked
<%
End If
else
%>
<b>No record to display</b>
<%
End if
%>
<%
If Recblockblockunblockif_els e.EOF = false then
If cint(Recblockblockunblocki f_else.Fie lds.Item(" worker_uid ").Value) = cint(Session("pt_login_id" ))
AND cint(Recblockblockunblocki f_else.Fie lds.Item(" blocker_id ").Value) = cint(RecmostofDuser.Fields .Item("id_ usr").Valu e) Then %>
<h1>free and open</h1><% Else %>this user is blocked
<%
End If
End if
%>
and thanks for points!
:-)
If Recblockblockunblockif_els
If cint(Recblockblockunblocki
AND cint(Recblockblockunblocki
<h1>free and open</h1><% Else %>this user is blocked
<%
End If
End if
%>
and thanks for points!
:-)
ASKER
wowa,
ok when the user is blocked this shows "this user is blocked", but when the user is not blocked it shows nothing where as it should show <h1>the user is not blocked</h1>, I find this so confusing, sorry to be a bother if you have any ideas i would be grateful, I wish I had given more points for this and didnt mean to close it so soon.
<%
If Recblockblockunblockif_els e.EOF = false then
If cint(Recblockblockunblocki f_else.Fie lds.Item(" worker_uid ").Value) = cint(Session("pt_login_id" ))
AND cint(Recblockblockunblocki f_else.Fie lds.Item(" blocker_id ").Value) = cint(RecmostofDuser.Fields .Item("id_ usr").Valu e) Then %>
<h1>the user is not blocked</h1><% Else %>this user is blocked
<%
End If
End if
%>
ok when the user is blocked this shows "this user is blocked", but when the user is not blocked it shows nothing where as it should show <h1>the user is not blocked</h1>, I find this so confusing, sorry to be a bother if you have any ideas i would be grateful, I wish I had given more points for this and didnt mean to close it so soon.
<%
If Recblockblockunblockif_els
If cint(Recblockblockunblocki
AND cint(Recblockblockunblocki
<h1>the user is not blocked</h1><% Else %>this user is blocked
<%
End If
End if
%>
ASKER
I have re asked this question in the forum as I needed to resolve this in a hurry, no offence , and thanks for your help.
Kenny
Kenny
hi kenny,
Sorry there is a delay in answering because of the time difference. When you are working, for me it is bed-time.
I think you would have already solved the problem.
My kind advice, first check the results carefully and then accept the answer.
Good Luck
Sorry there is a delay in answering because of the time difference. When you are working, for me it is bed-time.
I think you would have already solved the problem.
My kind advice, first check the results carefully and then accept the answer.
Good Luck
ASKER
Thanks I totally understand , have a great week.
regarsd
Kenny
regarsd
Kenny
ASKER
have a great weekend.
regards
Kenny