HTML code is showing up

C

CJ

Hi Groupies:

I am not sure what is going on in my report but if I enter
data in one of my text fields on a form, the corresponding
field will show HTML tags on the report....???

For example:

If I enter "This is nutty" in the form,
the report shows "<div> This is nutty </div>"

It doesn't show in the form, just the report.
So, I created a new report with just that text field in it.
Same thing, the code shows up.

So, I looked in the table and yep, there it is too!

What is going on?? Any ideas?
I have tried using the format painter to copy formatting
from other text fields, no luck....
 
A

Allen Browne

Is this Access 2007? If so, can we assume the text box on your form is bound
to a Memo field in a table, and the Memo's Text Format property shows as
rich text (not plain text)?

If that is the case, when you create a report, the text box on the report
should have its Text Format property set automaticallly for you. Open the
report in design view, and check the property of the text box.

You might need to set that property manually if the text box is bound to an
expression, such as:
=[Forms].[Form1].[MyNuttyTextBox]
 
C

CJ

Hi Allen, thanks for popping in.

You are correct in that it is Access 2007, however,
it is not and never has been a memo field.

I can manually take the tags out and they
stay out, but each new record gets them back
again.

--
Thanks for taking the time!

CJ
---------------------------------------------------------
Know thyself, know thy limits....know thy newsgroups!
Allen Browne said:
Is this Access 2007? If so, can we assume the text box on your form is
bound to a Memo field in a table, and the Memo's Text Format property
shows as rich text (not plain text)?

If that is the case, when you create a report, the text box on the report
should have its Text Format property set automaticallly for you. Open the
report in design view, and check the property of the text box.

You might need to set that property manually if the text box is bound to
an expression, such as:
=[Forms].[Form1].[MyNuttyTextBox]
 
A

Allen Browne

Okay, something has confused Access here into believing it should treat the
value as rich text in the form (but treat it correctly in the report.)

Firstly make sure the Name AutoCorrect options are turned off, so Access
doesn't misidentify the field. More info:
http://allenbrowne.com/bug-03.html
Then compact the database:
Office Button | Manage

Then double-check that the Text Format of the property in the form is plain
text.

Now to fix the existing bad data.
Create a query with criteria like this under this field:
Like "*<*>*"
View the query output, and make the rows about 3 lines high.
Remove the tags from the fields.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

CJ said:
Hi Allen, thanks for popping in.

You are correct in that it is Access 2007, however,
it is not and never has been a memo field.

I can manually take the tags out and they
stay out, but each new record gets them back
again.

--
Thanks for taking the time!

CJ
---------------------------------------------------------
Know thyself, know thy limits....know thy newsgroups!
Allen Browne said:
Is this Access 2007? If so, can we assume the text box on your form is
bound to a Memo field in a table, and the Memo's Text Format property
shows as rich text (not plain text)?

If that is the case, when you create a report, the text box on the report
should have its Text Format property set automaticallly for you. Open the
report in design view, and check the property of the text box.

You might need to set that property manually if the text box is bound to
an expression, such as:
=[Forms].[Form1].[MyNuttyTextBox]

CJ said:
Hi Groupies:

I am not sure what is going on in my report but if I enter
data in one of my text fields on a form, the corresponding field will
show HTML tags on the report....???

For example:

If I enter "This is nutty" in the form, the report shows "<div> This is
nutty </div>"

It doesn't show in the form, just the report.
So, I created a new report with just that text field in it.
Same thing, the code shows up.

So, I looked in the table and yep, there it is too!

What is going on?? Any ideas?
I have tried using the format painter to copy formatting
from other text fields, no luck....
 
C

CJ

Hi Allen

I hate to say it but the problem still exists after doing all of those
things.

What is interesting though, is if I use the down arrow and select Plain Text
from the dropdown box, it will give me an error that says:
"The setting you entered isn't valid for this property". I thought that
was the solution at first but then I tried it for a few other text
fields and I get the same error but they do not have tags showing up.

Text format will not allow me to select Rich Text. It flips it back to
Plain and shows the same error as above.

It's midnight where I live so I am heading to bed. I will check
back tomorrow. I hope you find something.

--
Thanks for taking the time!

CJ
---------------------------------------------------------
Know thyself, know thy limits....know thy newsgroups!
Allen Browne said:
Okay, something has confused Access here into believing it should treat
the value as rich text in the form (but treat it correctly in the report.)

Firstly make sure the Name AutoCorrect options are turned off, so Access
doesn't misidentify the field. More info:
http://allenbrowne.com/bug-03.html
Then compact the database:
Office Button | Manage

Then double-check that the Text Format of the property in the form is
plain text.

Now to fix the existing bad data.
Create a query with criteria like this under this field:
Like "*<*>*"
View the query output, and make the rows about 3 lines high.
Remove the tags from the fields.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

CJ said:
Hi Allen, thanks for popping in.

You are correct in that it is Access 2007, however,
it is not and never has been a memo field.

I can manually take the tags out and they
stay out, but each new record gets them back
again.

--
Thanks for taking the time!

CJ
---------------------------------------------------------
Know thyself, know thy limits....know thy newsgroups!
Allen Browne said:
Is this Access 2007? If so, can we assume the text box on your form is
bound to a Memo field in a table, and the Memo's Text Format property
shows as rich text (not plain text)?

If that is the case, when you create a report, the text box on the
report should have its Text Format property set automaticallly for you.
Open the report in design view, and check the property of the text box.

You might need to set that property manually if the text box is bound to
an expression, such as:
=[Forms].[Form1].[MyNuttyTextBox]

Hi Groupies:

I am not sure what is going on in my report but if I enter
data in one of my text fields on a form, the corresponding field will
show HTML tags on the report....???

For example:

If I enter "This is nutty" in the form, the report shows "<div> This is
nutty </div>"

It doesn't show in the form, just the report.
So, I created a new report with just that text field in it.
Same thing, the code shows up.

So, I looked in the table and yep, there it is too!

What is going on?? Any ideas?
I have tried using the format painter to copy formatting
from other text fields, no luck....
 
A

Allen Browne

Next step would be to delete the bad text box from the form.
Save. Close the form.
Compact the database.
Then add it back again.

BTW, if this is an attached table, make certain Name AutoCorrect is off in
the back end, and then compact both the back end and then the front end (in
that order.)

If it still comes in again, it must be the property of the field in the
table that is at fault. This might mean creating another text field in your
table, populating it with an Update query, deleting the old one, compacting
the database, and then renaming the field back to the old one again.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

CJ said:
Hi Allen

I hate to say it but the problem still exists after doing all of those
things.

What is interesting though, is if I use the down arrow and select Plain
Text
from the dropdown box, it will give me an error that says:
"The setting you entered isn't valid for this property". I thought that
was the solution at first but then I tried it for a few other text
fields and I get the same error but they do not have tags showing up.

Text format will not allow me to select Rich Text. It flips it back to
Plain and shows the same error as above.

It's midnight where I live so I am heading to bed. I will check
back tomorrow. I hope you find something.

--
Thanks for taking the time!

CJ
---------------------------------------------------------
Know thyself, know thy limits....know thy newsgroups!
Allen Browne said:
Okay, something has confused Access here into believing it should treat
the value as rich text in the form (but treat it correctly in the
report.)

Firstly make sure the Name AutoCorrect options are turned off, so Access
doesn't misidentify the field. More info:
http://allenbrowne.com/bug-03.html
Then compact the database:
Office Button | Manage

Then double-check that the Text Format of the property in the form is
plain text.

Now to fix the existing bad data.
Create a query with criteria like this under this field:
Like "*<*>*"
View the query output, and make the rows about 3 lines high.
Remove the tags from the fields.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

CJ said:
Hi Allen, thanks for popping in.

You are correct in that it is Access 2007, however,
it is not and never has been a memo field.

I can manually take the tags out and they
stay out, but each new record gets them back
again.

--
Thanks for taking the time!

CJ
---------------------------------------------------------
Know thyself, know thy limits....know thy newsgroups!
Is this Access 2007? If so, can we assume the text box on your form is
bound to a Memo field in a table, and the Memo's Text Format property
shows as rich text (not plain text)?

If that is the case, when you create a report, the text box on the
report should have its Text Format property set automaticallly for you.
Open the report in design view, and check the property of the text box.

You might need to set that property manually if the text box is bound
to an expression, such as:
=[Forms].[Form1].[MyNuttyTextBox]

Hi Groupies:

I am not sure what is going on in my report but if I enter
data in one of my text fields on a form, the corresponding field will
show HTML tags on the report....???

For example:

If I enter "This is nutty" in the form, the report shows "<div> This
is nutty </div>"

It doesn't show in the form, just the report.
So, I created a new report with just that text field in it.
Same thing, the code shows up.

So, I looked in the table and yep, there it is too!

What is going on?? Any ideas?
I have tried using the format painter to copy formatting
from other text fields, no luck....
 
C

CJ

This database has tables that have been around for a very long time. Perhaps
Name AutoCorrect used to be on and the issues are just showing up
since I converted to 2007.

Thanks Allen, I will try your suggestions.

--
Thanks for taking the time!

CJ
---------------------------------------------------------
Know thyself, know thy limits....know thy newsgroups!
Allen Browne said:
Next step would be to delete the bad text box from the form.
Save. Close the form.
Compact the database.
Then add it back again.

BTW, if this is an attached table, make certain Name AutoCorrect is off in
the back end, and then compact both the back end and then the front end
(in that order.)

If it still comes in again, it must be the property of the field in the
table that is at fault. This might mean creating another text field in
your table, populating it with an Update query, deleting the old one,
compacting the database, and then renaming the field back to the old one
again.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

CJ said:
Hi Allen

I hate to say it but the problem still exists after doing all of those
things.

What is interesting though, is if I use the down arrow and select Plain
Text
from the dropdown box, it will give me an error that says:
"The setting you entered isn't valid for this property". I thought that
was the solution at first but then I tried it for a few other text
fields and I get the same error but they do not have tags showing up.

Text format will not allow me to select Rich Text. It flips it back to
Plain and shows the same error as above.

It's midnight where I live so I am heading to bed. I will check
back tomorrow. I hope you find something.

--
Thanks for taking the time!

CJ
---------------------------------------------------------
Know thyself, know thy limits....know thy newsgroups!
Allen Browne said:
Okay, something has confused Access here into believing it should treat
the value as rich text in the form (but treat it correctly in the
report.)

Firstly make sure the Name AutoCorrect options are turned off, so Access
doesn't misidentify the field. More info:
http://allenbrowne.com/bug-03.html
Then compact the database:
Office Button | Manage

Then double-check that the Text Format of the property in the form is
plain text.

Now to fix the existing bad data.
Create a query with criteria like this under this field:
Like "*<*>*"
View the query output, and make the rows about 3 lines high.
Remove the tags from the fields.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Hi Allen, thanks for popping in.

You are correct in that it is Access 2007, however,
it is not and never has been a memo field.

I can manually take the tags out and they
stay out, but each new record gets them back
again.

--
Thanks for taking the time!

CJ
---------------------------------------------------------
Know thyself, know thy limits....know thy newsgroups!
Is this Access 2007? If so, can we assume the text box on your form is
bound to a Memo field in a table, and the Memo's Text Format property
shows as rich text (not plain text)?

If that is the case, when you create a report, the text box on the
report should have its Text Format property set automaticallly for
you. Open the report in design view, and check the property of the
text box.

You might need to set that property manually if the text box is bound
to an expression, such as:
=[Forms].[Form1].[MyNuttyTextBox]

Hi Groupies:

I am not sure what is going on in my report but if I enter
data in one of my text fields on a form, the corresponding field will
show HTML tags on the report....???

For example:

If I enter "This is nutty" in the form, the report shows "<div> This
is nutty </div>"

It doesn't show in the form, just the report.
So, I created a new report with just that text field in it.
Same thing, the code shows up.

So, I looked in the table and yep, there it is too!

What is going on?? Any ideas?
I have tried using the format painter to copy formatting
from other text fields, no luck....
 

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