Removing HTML fields in Access 2000

  • Thread starter Jesse_Littlewood
  • Start date
J

Jesse_Littlewood

Hi Folks-

There is an old post from '04 about this, but this issue wasn't
addressed. Hoping someone can help with this!

I'm trying to remove all HTML tags from 2 memo fields, leaving just
the text behind. In a perfect world, they'd replace the <br> tags with
line breaks, but just removing them would be a start.

This data comes from a list of resumes on my site, and oddly enough if
I copy and paste them from the browser to the resume field, I end up
with it pretty well formatted. But there are too many and it is too
awkward to do that, so the current process turns the HTML-formatted
data into a .tab file, which I then import into Access 2000. When I
view the data (or mail-merge it to Word), the HMLT tags are there,
making it all but impossible to read.

Here is the thread from the last discussion of this:
http://groups.google.com/group/microsoft.public.access.queries/msg/b8da8efc47adc642

I've attempted to do the module with the code that is posted on that
message, but I end up with my field getting replaced by "0" and all
the data gone.

Any ideas out there?

Thanks
Jesse
 
L

Larry Linson

I'm sorry I just don't have time and energy to copy, generate test data for,
and test the code, but on slightly-more-than-casual inspection it looks good
to me. Near the bottom of the example, you will find instructions on how to
call it, replacing the HTML markup with " "... if you want to replace the
HTML with a new line, replace the " " argument with Chr$(13) & Chr$(10).

The Query should have the text, without the HTML, but with new lines where
it was -- the Query shown does NOT update the Table.

I don't understand what you mean when you describe what is happening -- if
you are using the Query that Graham included after the function, it doesn't
update anything, it only retrieves data. You could use it as the basis for
an Update Query, perhaps.

Larry Linson
Microsoft Office Access MVP
 
J

Jesse_Littlewood

Hi Larry-

Thanks so much for your post.

Yes, I'm using it as an Update Query -- its the first time I've done
that, so I'll try looking into resources about how to make sure I'm
doing it right.

Thanks for the help on making new lines.

I'll post back after messing around.

Thanks again!
Jesse
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Top