Jump to content

Trying an "IF" statement with no success


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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...