Jump to content

Trying an "IF" statement with no success


KickinAndScreamin

Recommended Posts

Currently, I have this DLookup statement on an ASP page, and it returns an appropriate value:<% =DLookUp("[Offer$P]","[Offer]","[MLSno]=" & rs("FreisNo"))%>Now, I've decided that I only want to show this value of Offer$P when "STATUS" = S.If "STATUS" equals anything else other than S, I want the result to read "Agency Applies".Here's part of the statement that "pulls" status into evaluation: sSQL = "SELECT DISTINCTROW PType, Twp, City, Status, [Now List], " & _"FROM [FREIS02] "I want the IF statement to evaluate if Status=S and if it is, return the value of Offer$PIf Status <>S, then show "Agency Applies"Another set of eyes on this would be highly welcomed!Here's what does not work:<% =if((DLookUp("[status]","[Offer]","[MLSno]=" & rs("FreisNo"))="S",<% =DLookUp("[Offer$P]","[Offer]","[MLSno]=" & rs("FreisNo"))%>,"Agency Applies")%>

 

My brain feels fritzed out! Also, this is my first post to this forum - is there a way to set it so when a reply to my predicament is posted, and email comes to my inbox? (That would be very useful.)

Link to comment
Share on other sites

You have too many ASP tags in that, ASP tags do not go inside other ASP tags. <% and %> tell the server that it is a block of ASP code, it's an error if you try to use one inside ASP code because <% or %> is not valid ASP code (just a special tag to tell the server that what is inside them is ASP code).

is there a way to set it so when a reply to my predicament is posted, and email comes to my inbox?

There's a button on the top of the page that says "Follow this topic".
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...