Form or table: auto entered value

joolsUK0575

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

I have a small problem that I was wondering if someone could help with.

When a user creates a new record I would like it so that some html is written automatically in to a defined column.

Is this possible? I tried to use the default value property of a column but access does not like it.

Any ideas :confused:

Thanks :D

Jools
 
What do you want to put in it, as long as you are entering data from a form you have lots of flexibility.
Peter
 
I'd like to put in HTML.

EG: <a href="http://www.thiswebspage.com">Link</a>

Is this possible? If so. How?
 
If your form is bound to a table. Just hyperlink a field(string) then assign it to your textbox control.

In the OnLoad Event.
me.MyTextBoxctrl ="http://www.thiswebspage.com"
 
Will this work when rendering the results of the database through a web page?

That is the reason I said about the HTML.
 
When you click in that Control. It will load your page.
With some more Java+MySQL+XML, you can render your database results to that weebpage.
 
I assume that you want someone to type
www.thiswebspage.com
into a field and have another get
<a href="http://www.thiswebspage.com">Link</a>

In the afterupdate event of the firstfield add code like
Me.HtmlField = "<a href://='" & me.WebField & "'>Link</a>"

not tested but it should give you the idea
If I am barking up the wrong tree shout back with more detail

peter

Edited out too much pasting :o
 
Last edited:
Hi Bat17

Nearly

When someone creates a new record I want the HTML automatically put in to the required field.

The reason for this is the contents of the database is being published on the web and I want to render the HTML.
 
Set it default value to
'<a href="http://www.thiswebspage.com">Link</a>'

wrapping it in single quotes. It is not really a good design feature though as it repeats data, you could just add it to the query when you suck the data out of the table.

Peter
 
nearly. But what about the single quotes. Will this still render a hyperlink on the web page or will it cause it to fall over?
 
I dont think that the quotes export, they just let you use dblquotes in the text. I expect HTML will ignore them if they do get through but test it
Peter
 
The just keep the link as basic text and use the script around it (ASP.NET) to create the necessary HTML tags. I've not used ASP.NET so I don't know the syntax, but something like:

Code:
Dim x
Dim y
x = rs("LinkField")
y = rs("LinkName")
Response.Write "<a href=""" & x & """ title=""" & y & """>" & y & "</a>"
 
Um.

Now you lost me :confused:

What do I do with that and where do I put the code?
 

Users who are viewing this thread

Back
Top Bottom