Auto entering of HTML in to a column

joolsUK0575

Registered User.
Local time
Today, 10:58
Joined
May 6, 2004
Messages
49
Hi there

I need help in a problem that I have and I "think" that VB may be able to help in resolving it.

What I need to be able to is as follows:

When a user creates a new record within a database a specific piece of HTML will be automatically written in to a column.

How in the heck do I do this? I have searched the net high and low gaining a headache along the way.

I have tried to do it through the default value property of a column bit no joy.

Any advice?

Thanks

Jools
 
What is the HTML you want to write into the column? Do you want it to APPEAR as HTML code in the field?
 
I want something along the lines of

<img src="Images/Key/reddot.gif" width="24" height="24">

This would be automatically placed in to the column each time a user generates a record.

The database is being fed out on to the web which is why I want this to happen.

Thanks for the help so far
 
Try changing your double quotes (") to single quotes (') and setting as the default for the field. Then put double-quotes around the entire string. So, you would end up with "<img src='Images/Key/reddot.gif' width='24' height='24'>" as the default for the field.

HTH
 
Last edited:
OK.

Buggered up!

Tried putting this in to a table that is a linked table from SQL Server.

Didn't save it!

Anyone know how to get this html in the default value of the SQL Table itself?
 
Are you using a form to allow the data entry? If so, you could just make it a default on the form field...
 
If you are using the same value each time then you should not be saving it in a table anyway but adding it to the queryon output.
I have never used SQL Server but in Access it would be:-

SELECT MyTable.ID, MyTable.SomeField, "<img src='Images/Key/reddot.gif' width='24' height='24'>" AS MyImage
FROM MyTable;


HTH

Peter
 

Users who are viewing this thread

Back
Top Bottom