Results 1 to 9 of 9

Thread: Image is null

  1. #1
    Join Date
    Sep 2009
    Posts
    21

    Unanswered: Image is null

    If I grab the location of an image through a database and the return value is null I want to have it so no image comes up. What is the best way to do that.

    <%if <"image"> = null then
    <"image"> = "".
    %>

    how can I cancel out that image? In a nice way.

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    nothing can ever equal null.

    Did you go through that tutorial I suggested yet?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Sep 2009
    Posts
    21
    I didn't see anything there about null values. Send me the page if I'm wrong.
    Last edited by bingo_barns; 09-12-09 at 17:13.

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    You want this function: VBScript IsNull Function
    George
    Home | Blog

  5. #5
    Join Date
    Sep 2009
    Posts
    21
    Thanks alot man.

  6. #6
    Join Date
    Sep 2009
    Posts
    21
    hmm I'm still having trouble getting this to work.

    <% If (IsNull("sVendorImg"))then %>

    'do nothing

    <% else %>

    <img src = "<%=qtest2("sVendorImg")%>" class="floatleft">

    <% end if %>

    I'm grabbing an image from a data base <img src = "<%=qtest2("sVendorImg")%>" And I need to have it so if there is nothing in the field sVendorImg it will jump past it.
    Last edited by bingo_barns; 09-14-09 at 11:01.

  7. #7
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Look at what you're passing to the IsNull() function - a string literal!
    George
    Home | Blog

  8. #8
    Join Date
    Sep 2009
    Posts
    21
    haha jesus!

  9. #9
    Join Date
    Sep 2009
    Posts
    21
    Thanks got it to work perfectly.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •