Use a textarea to edit and update Access record

vzdog used Ask the Experts™
Hello all. I am trying to follow the example on the w3schools site to update a database record in Access. With, 1 slightly different way. I want to use a textarea only to do this.
What I am trying to do is provide a single location for a "Message of the Day" to be updated as the boss decides to. The messages will not be stored in the Access db other than the current one, and my in tent is the can access it and the overwrite the existing then just save it.

I appreciate all input.

My code is based on
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Wayne BarronAuthor, Web Developer
Top Expert 2009

This will show you how to update the field with a TextField.
This will also show you how to seperate the linebreaks and how to compile
Through without error inserting single Quotes (Replacing with Double Quotes)
Plus some more goodies.

If you have any questions, let me know



carrzkiss - thanks for the reply. Just getting back in and will look through this morning as soon as I can.
I of course will accept as solution if applicable. Thanks!


Microsoft JET Database Engine error '80040e14'
Syntax error (missing operator) in query expression 'id='.
Q_24580137.asp, line 11

Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.


I still have recieved a solution for this issue.
As I stated in my initial post , My code is based on

I can get this all to work fine, except for when I am trying to allow the user to edit the message. The message is written out in a text box,  which makes it hard to read. I would like to have it displayed in a textarea.
I am attaching the code I am using for the edit page and the submit page, in hopes someone can tell me how to properly utilize a textarea - that will allow a user to update the field through the submit button.
<!-- Edit.asp-->
<form method="post" action="ExecSub.asp">
<input name="no" type="hidden" value=<%=no%>>
<table bgcolor="#b0c4de">
for each x in rs.Fields
      if <> "no" and <> "dateadded" then%>
           <td><> </td>
	   <td><input name="<>" value="<%=x.value%>"></td>
	 <%end if
<br />
<input type="submit" name="action" value="Save">
if Request.form("action")="Save" then
      sql="UPDATE tblExecMsg SET "
      sql=sql & "message='" & Request.Form("message") & "'"
      sql=sql & "WHERE tblExecMsg.[no]=" & no
'on error resume next
conn.Execute sql, Recordsaffected
set conn = nothing
set sql = nothing 
end if 

Open in new window

Author, Web Developer
Top Expert 2009

did you not pay attention to the url demo that I have posted?

The querystring at the end of it tells the query what record to pull and show to you.

Make sure that you run it on your site exactly as I have it here,

with the    ?id=1


Carrzkiss - I got it Thanks!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial