Solved

Display region IF

Posted on 2013-06-22
2
319 Views
Last Modified: 2013-06-22
I need to modify the following statement:

<% If Qnrpg1.EOF And Qnrpg1.BOF Then %>

-- REGION --

<% End If >

The above shows a region IF a recordset is empty (Using dreamweaver). I need to add another condition, it has to be IF its empty OR (if it is NOT empty AND the value of the field is = 1)

The recordset name is : 'Qnrpg1'
The field name is:  'email'

What would the syntax be ?
0
Comment
Question by:amucinobluedot
2 Comments
 

Author Comment

by:amucinobluedot
ID: 39268114
I tried this but I get a syntax error:

<% If (Qnrpg1.EOF And Qnrpg1.BOF) OR (Qnrpg1.EOF Or Not Qnrpg1.BOF AND Qnrpg1.sex = 1)  Then %>
0
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 39268127
If not Qnrpg1.eof or not Qnrpg1.bof then
     if cstr(Qnrpg1("sex"))="1" then
         'show some code
     end if
end if

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
The viewer will learn how to count occurrences of each item in an array.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

947 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now