Using "" and <> in IFF() for html references

larrynew

Registered User.
Local time
Today, 16:35
Joined
Aug 27, 2008
Messages
12
Another thanks for the help with UNION ALL and the 31 Excel spreadsheets from last week. Working great.

I hope I can ask my next question well enough to be understood. Here goes.

I upload a spreadsheet file (their required format) to my website to update the price, description, etc. It contains fields such as id, code, sale-price, name, path_for_website, caption, etc. I'm switching from Excel to Access and have sucessfully (with help here and from my trusty Access for Dummies 2003) configured Access to calculate sale-price in a query that I reference in a Column Form and then export to an Excel file but now I'm stuck on the caption field.

The caption field is where I combine a large text description with optional html code. If the product is a chemical, I include information on its MSDS (safety sheet) with a link to a .pdf file.

I'm trying to do a query that combines the large text description with the optional html in Expression Builder. I understand IIF and &. The problem I'm having is using text like below in the IFF statement. I don't think it likes "" and <>. It goes something like: caption: [large description] & IFF([msds]="","",insert text below, here).

<br><br> MSDS: <a href="http://site.papersmith.com/msds/ & [msds] & " target="_blank"><img src="http://lib.store.yahoo.net/lib/yhst-15797421323679/msds.gif" border="0"></a>

Are there some magic brackets that allow me to use ""'s and <>'s? Is Expression Builder in a Query even the correct place to be doing this?

Thanks,
Larry
 
Last edited:
Not exactrly "magic brackets", but you can replace the " character with " & chr(34) & "

Similarly you can substitute for the ( character [=chr(40)], and the ) character [=chr(41)].
 
Thanks! Works great.

Larry
 

Users who are viewing this thread

Back
Top Bottom