Knowledge.ToString()

MS Access: HTML Editor Control to Use in Forms

If you want to get HTML editor within MS Access form, there are couple of solutions available. The free solution I know is to get Not So Elegant HTML Editor. The problem with this editor is that

  • After looking at this editor, you will never say “so cool”
  • It is good for basic editing but many important functionality like “Table” editing is missing.

When I had to create HTML Editor within MS Access form, I asked the question to myself “Why to reinvent the wheel?” and the solution I came up with has the main benefits

  • It is completely FREE
  • When users will look at it, they will definitely say “so cooooool”.
  • Rich feature set
  • XHTML compliant code will be generated and hence output can be used anywhere.
  • Plugin based architecture can help add extra cool features

Here is a sample of how this editor would look like

Access HTML Editor

The solution is to use readily available Web based HTML Editor like CKEditor, TinyMCE and embed them into MS Access forms. You can easily communicate between the Web based HTML editor and VBA code using VBA DOM manipulation functions available for Microsoft Web Browser ActiveX Control.

Download

Download Sample MS Access Form

Share

Comments

22 responses to “MS Access: HTML Editor Control to Use in Forms”

  1. David Plaut Avatar
    David Plaut

    Years later…. still useful!

    1. Vishal Monpara Avatar
      Vishal Monpara

      Hi David,

      Microsoft hasn’t changed MS Access internals much and hence it just works. I am glad that you found this solution helpful.

      Regards
      Vishal Monpara

  2. Woody Avatar
    Woody

    It seems to be that the included Access form is in “Read Only” mode as I cannot figure how to open it in design mode to make any use of it? What am I missing here?

  3. Lance Avatar
    Lance

    Hi,

    I’ve downed this and found a bug, when hitting the “Enter” key nothing works. Only works if using holding down the ‘Control’ button at the same time.

    Anyone know why?

  4. michel Avatar
    michel

    Hi Floks,

    I try to run your application. (access2010). I got this error :
    “CKEditor requires JavaScript to run. In a browser with no JavaScript support, like yours, you should still see the contents (HTML data) and you should be able to edit it normally, without a rich editor interface.”
    Is there a component to activate ?

    Thanks for your work

  5. Laurent Avatar
    Laurent

    Hello, dsl for the translation, I’m French. I downloaded the sample Access and CKEditor but that doesn’t. I’m on ACCESS 2010 and I have a message that says “Access denied” on line “v = wbEditor.Document.parentWindow.execScript (FunctionName &”{}”). Thank you for your help.

  6. Wasif Avatar
    Wasif

    CKEditor requires JavaScript to run. In a browser with no JavaScript support, like yours, you should still see the contents (HTML data) and you should be able to edit it normally, without a rich editor interface.

    I am receiving this message.. I am using windows 8, ms access 2010 and obviously ie10 as default browser.

  7. AngelMiguel Avatar
    AngelMiguel

    Hey.
    Ok from local and:

    But I can not habrir the publisher in form

  8. sam grant Avatar
    sam grant

    @Ray
    could get it partly to work on access 2010 but it comes up with permission denied every now and then

  9. Ray Avatar
    Ray

    I am having issues with it running in Access 2010, all extracted.

    Not sure what the previous comments fixes suggested. Not clear enough.

  10. Phil Avatar
    Phil

    When I open up the Update HTML form, the box is blank. There is no HTML editor

    1. Vishal Avatar
      Vishal

      Phil,

      Did you open it directly from zip file? If so, please extract the contents and then try to open it again.

  11. Nickonice Avatar
    Nickonice

    hmm… iiritating…
    see http://msdn.microsoft.com/en-us/library/ms537628(v=vs.85).aspx
    and use the saved from local

  12. Nickonice Avatar
    Nickonice

    haha can’t type the text:

  13. Nickonice Avatar
    Nickonice

    sorry, forgot to paste the text you should type under the DOCTYPE decleration:

  14. Nickonice Avatar
    Nickonice

    For everyone who uses MS Access 2010, I did have the same problem and the solution is very easy.

    Edit the file ckeditor.html and put under the DOCTYPE declaration:

    That’s all, now it’s working again! The CKEditor editor is a great solution I think!

  15. mai Avatar
    mai

    Can I use this to Excel VBA?

  16. POL Avatar
    POL

    Sorry but it doesnt work…

    on
    function SetJavascriptData(…)

    v=wbeditor.document.parentwindow.execscript(FunctionName & “()”)

    End Function

    Access Denied

  17. aki Avatar
    aki

    Very useful info, I’ve adapted your code for MS Excel 2007 and it works fine!

    Thank you

  18. RobbL Avatar
    RobbL

    works beautifully however…

    how are you able to print to MS Access reports and have it understand some of the many available formatting options?

    Rich Text boxes linked to the Memo fields only understand a portion of the formatting?

    Is there an active x HTML control you can use on reports that works well in conjuction?

  19. Markus Avatar
    Markus

    Thanks for sharing. The download link is not working. 🙁

    1. Vishal Avatar
      Vishal

      Thanks for notifying. I have updated the link.

Leave a Reply

Your email address will not be published. Required fields are marked *