Microsoft Access HTML Viewer

Discussion in 'Access Forms Coding' started by JamieJamie, Jul 26, 2010.

  1. JamieJamie

    JamieJamie Guest

    I have a field of text written in html and stored in a memo field.
    instead of displaying in a memo field, i would like to see it
    presented as html (as you would in interent explorer)

    is there any easy way of doing this?

    thanks in advance for your help
    JamieJamie, Jul 26, 2010
    1. Advertisements

  2. :
    Depends on your version of Access. In A2010, the new rich-text
    control makes this quite transparent. Before that you had to use the
    non-native web browser control, which works fairly well but has some
    quirks (and can only display a file from the file system, not an
    arbitrary stream of HTML).
    David W. Fenton, Jul 26, 2010
    1. Advertisements

  3. JamieJamie

    Ron Weiner Guest

    David W. Fenton formulated the question :
    While it is true that you can not bind a Web Browser control to an
    Access data source as you can with a Rich Text control. You do not
    HAVE to point the web Browser control to either a file on the disk or a
    URL on the internet.

    The Web Browser control CAN accept a stream of html in the
    BeforeNavigate2 Event.

    wb.Document.Open "text/html", "replace"
    wb.Document.Write strHTML

    Been using this code for years in an old VB6 app that builds the string
    strHTML above from data pulled out of an Access database.

    Ron Weiner, Jul 27, 2010
  4. Damn. I didn't know that. I'll have to try it in the app of mine
    that makes the most use of the web browser control (and writes to a
    temp file).

    You learn something new every day, and in this case, it's for
    something I've been doing for better than half a decade!
    David W. Fenton, Jul 28, 2010
  5. I'd like to add my thanks to David's, and for much the same reason.
    Stuart McCall, Jul 28, 2010
  6. And silly me, I didn't even say thanks!

    So, here it is:

    Thanks very much, Ron, for pointing this out!
    David W. Fenton, Jul 28, 2010
  7. JamieJamie

    Ron Weiner Guest

    David W. Fenton formulated on Wednesday :

    Thanks is absolutely not necessary. I thought that this is what the
    newsgroup was about. Hardly a week goes by that I am not learning and
    pilfering code from another's post. Also you gotta' know I did not
    invent this, I can't remember any of the details, but you can be sure,
    I stole if from somewhere!

    Ron Weiner, Jul 29, 2010
  8. JamieJamie


    Can you share more code? I'm getting Document = Nothing in object passed to event, so Document.Open is not working.

    четверг, 29 Ð¸ÑŽÐ»Ñ 2010 г., 4:15:19 UTC+4 пользователь Ron Weiner напиÑал:
    , Jan 30, 2013
  9. JamieJamie


    Perfect Rdub!
    , Jan 14, 2014
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.