Form to Excel or Access

Is there an easy way to post form contents to:

EMail & Excell
or
Email & Access?

I need help here

Thanks
pinkstonmAsked:
Who is Participating?
 
ClassyLinksConnect With a Mentor Commented:
did the files I sent help?
0
 
ClassyLinksCommented:
Forget Excel.  If you have more than one user on the form at a time it will lock up.

Email & Access yes.  The easiest way IMHO is with ASP & CDONTS.

Do you have both ASP and CDONTs installed on your server?  If yes, I will show you some code.

If not....then you might have to consider some PERL (YUCK!) and some CGI (double-YUCK!).
0
 
pinkstonmAuthor Commented:
Classy,

You are the BEST!

Yes i do have CDONT & ASP...

So Shoot me with what ya got.

Thanks
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
ClassyLinksCommented:
Ok.

Here is a little script that adds values to a database, and sends an email.

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Access & Email Example for Pinkstronm</title>
</head><%
Select Case Request.QueryString("action")
     Case "save"

          set conn = server.createobject("adodb.connection")
          conn.ConnectionString="Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("pinkstronm.mdb")&";"
          conn.open
         
          addSQL = "INSERT INTO tablename (name, email) VALUES (" & request.form("Name") & ",'" & request.form("Email") & "')"
          conn.execute addSQL
         
          SendEmailNotification
                           
                       
'Now, we give them the option of returning to your home page.
    %>


<body topmargin="0" marginheight="0" leftmargin="0" marginwidth="0">
<p></P><P align="center">
    <%response.write"<I>Your information has been submitted.   We will respond ASAP.<br><br><A HREF='http://yourhomepage.com'>Click here to go back to the Home Page</I></A></p>"
   
     Case Else
%>

<form method="POST" action="form.asp?action=save" name="FrontPage_Form1">
              <table border="0" width="130%">
         <tr>
           <td width="22%" align="left">Name</td>
           <td width="79%"><input type="text" name="Name" size="60"></td>
         </tr>
         <tr>
           <td width="22%" align="left">Email</td>
           <td width="79%"><input type="text" name="Email" size="60"></td>
         </tr>
         <tr>
           <td width="22%" align="left"></td>
           <td width="79%"><input type="submit" value="Submit" name="Action"></td>
         </tr>
       </table>
     </form><%

' This part specifies the format and contents of the email message

Sub SendEmail(strFrom, strTo, strSubject, strBody)
     ' DB and email object vars for email notification
     Dim objCDOMail

          Set objCDOMail = Server.CreateObject("CDONTS.NewMail")

          objCDOMail.From = strFrom
          objCDOMail.To = strTo
          objCDOMail.Subject = strSubject
          objCDOMail.Body = strBody

          ' Send the message!
          objCDOMail.Send
          Set objCDOMail = Nothing
End Sub ' SendEmail

Sub SendEmailNotification()
     
     SendEmail _
                              request.form("email"), "pinkstronm@yourhost.com", "A new entry has been submitted.", _
                              "This person has been added:" & vbcrlf &_
                              "Name: " & request.form("Name") & vbcrlf
                             

End Sub 'SendEmailNotification

End Select
%>
 </body>

</html>


It needs to be saved as form.asp and you need to modify the Server.MapPath to reflect the path to your access db.

You will also need to modify the tablename and the fields to reflect your database.

Let me know if there is anything that is unclear and I will expand further.

<BTW- I modified this from something I did for another user, but have NOT tested it on my server...if I have a typo or anything else that creates an error, I appologise and will walk you through any fixes required...thanks.>

0
 
ClassyLinksCommented:
How's it working for your pink?
0
 
ClassyLinksCommented:
Pink...please come back!  It is very frustrating for me when I don't know how you are doing and how I can help....or if this answer did the trick for you.
0
 
pinkstonmAuthor Commented:
Classy I had family problems and was away from the office THu & Fri I tried it over the weekend and it is not going so well.

Code
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Access & Email Example for Pinkstronm</title>
</head><%
Select Case Request.QueryString("action")
    Case "save"

         set conn = server.createobject("adodb.connection")
         conn.ConnectionString="Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("requests.mdb")&";"
         conn.open
         
         addSQL = "INSERT INTO requests (name, email) VALUES (" & request.form("Name") & ",'" & request.form("Email")
& "')"
         conn.execute addSQL
         
         SendEmailNotification
                           
                       
'Now, we give them the option of returning to your home page.
   %>


<body topmargin="0" marginheight="0" leftmargin="0" marginwidth="0">
<p></P><P align="center">
   <%response.write"<I>Your information has been submitted.   We will respond ASAP.<br><br><A HREF='http://yourhomepage.com'>Click
here to go back to the Home Page</I></A></p>"
 
    Case Else
%>

<form method="POST" action="form.asp?action=save" name="FrontPage_Form1">
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
      <td width="50%"><font size="2" face="Arial">Date: (dd monthccyy)</font></td>
      <td width="50%" colspan="3"><font face="Arial" size="2"><input type="text" name="Date" size="20"></font></td>
    </tr>
    <tr>
      <td width="50%"><font face="Arial" size="2">Requesting Account Manager (name)</font></td>
      <td width="50%" colspan="3"><font face="Arial" size="2"><input
  type="text" name="Acct_Mgr" size="20"></font></td>
    </tr>
    <tr>
      <td width="50%"><font face="Arial" size="2">Requesting Account Manager NetID</font></td>
      <td width="50%" colspan="3"><font face="Arial" size="2"><input type="text" name="Mgr_Netid" size="20"></font></td>
    </tr>
    <tr>
      <td width="50%"><font face="Arial" size="2">E-mail Address&nbsp;</font></td>
      <td width="50%" colspan="3"><font face="Arial" size="2"><input
  type="text" name="Mgr_Email" size="20"></font></td>
    </tr>
    <tr>
      <td width="50%"><font face="Arial" size="2">Telephone</font></td>
      <td width="50%" colspan="3"><font face="Arial" size="2"><input
  type="text" name="Mgr_Phone" size="20"></font></td>
    </tr>
    <tr>
      <td width="50%"><font face="Arial" size="2">Requesting Account/Department</font></td>
      <td width="50%" colspan="3"><font face="Arial" size="2"><input type="text" name="Acct" size="20"></font></td>
    </tr>
    <tr>
      <td width="50%"><font face="Arial" size="2">Account Orgid</font></td>
      <td width="50%" colspan="3"><font face="Arial" size="2"><input type="text" name="Acct_Orgid" size="20"></font></td>
    </tr>
    <tr>
      <td width="100%" colspan="4"><font face="Arial" size="2">&nbsp;</font></td>
    </tr>
    <tr>
      <td width="100%" colspan="4"><font face="Arial" size="2">Enter your Justification for Exemption in the space provided below:</font></td>
    </tr>
    <tr>
      <td width="100%" colspan="4">
        <p align="left"><textarea name="Justification" rows="5" cols="42"></textarea></td>
    </tr>
    <tr>
      <td width="100%" colspan="4"><font face="Arial" size="2">&nbsp;</font></td>
    </tr>
    <tr>
      <td width="50%"><font size="2" face="Arial">Enter number of workstations requiring exemption:</font></td>
      <td width="21%" align="center" colspan="2"><input type="text" name="9x_Exemptions" size="5"> </td>
      <td width="29%"><font face="Arial" size="2">Win 9x</font></td>
    </tr>
    <tr>
      <td width="50%"></td>
      <td width="21%" align="center" colspan="2"><input type="text" name="2000_Exemptions" size="5"> </td>
      <td width="29%"><font face="Arial" size="2">Win NT/2000</font></td>
    </tr>
    <tr>
      <td width="100%" colspan="4"></td>
    </tr>
    <tr>
      <td width="100%" colspan="4">
  <p><font size="2" face="Arial">Current alternative virus protection?</font></p>
  <p><select name="AV Type" size="1">
    <option value="McAfee">McAfee</option>
    <option value="Norton">Norton</option>
    <option value="Other">Other</option>
  </select>&nbsp;&nbsp;&nbsp; <font size="2" face="Arial">Other</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
  <input type="text"
  name="Other" size="20"></p>
      </td>
    </tr>
    <tr>
      <td width="100%" colspan="4">&nbsp;</td>
    </tr>
    <tr>
      <td width="100%" colspan="4">
  <p><font size="2" face="Arial">Describe your current method of updating existing
  anti-virus software:</font><dl>
    <dd><textarea name="Current Method" rows="5" cols="42"></textarea></dd>
  </dl>
      </td>
    </tr>
    <tr>
      <td width="100%" colspan="4">&nbsp;</td>
    </tr>
    <tr>
      <td width="100%" colspan="4">
  <p><font size="2" face="Arial">Enter additional comments in the space provided below:</font><dl>
    <dd><textarea name="Comments" rows="5" cols="42"></textarea></dd>
  </dl>
      </td>
    </tr>
    <tr>
      <td width="100%" colspan="4"><font face="Arial" size="2">&nbsp;&nbsp;</font></td>
    </tr>
    <tr>
      <td width="100%" colspan="4"><font face="Arial" size="2">&nbsp;&nbsp;</font></td>
    </tr>
    <tr>
      <td width="50%" colspan="2" align="left"><input type="submit" value="Submit" name="B6">&nbsp;
        <input type="reset" value="Clear Form"
  name="B7"></td>
      <td width="50%" colspan="2" align="left"></td>
    </tr>
  </table>
  <p>&nbsp;</p>
    </form><%

' This part specifies the format and contents of the email message

Sub SendEmail(strFrom, strTo, strSubject, strBody)
    ' DB and email object vars for email notification
    Dim objCDOMail

         Set objCDOMail = Server.CreateObject("CDONTS.NewMail")

         objCDOMail.From = strFrom
         objCDOMail.To = strTo
         objCDOMail.Subject = strSubject
         objCDOMail.Body = strBody

         ' Send the message!
         objCDOMail.Send
         Set objCDOMail = Nothing
End Sub ' SendEmail

Sub SendEmailNotification()
   
    SendEmail _
                             request.form("email"), "matt.pinkston@eds.com", "A new entry has been
submitted.", _
                             "This person has been added:" & vbcrlf &_
                             "Name: " & request.form("Name") & vbcrlf
                             

End Sub 'SendEmailNotification

End Select
%>
</body>

</html>


My Database is requests.mdb and when i copied it in it go moved to the fdpb directory off the root.

the variables in the requests table are:
reqno
Date
Acct_Mgr
Mgr_Netid
Mgr_Email
Mgr_Phone
ACCT
Acct_Orgid
Justification
9x_Exemptions
2000_Exemptions
AV_Type
Other
Current_Method
Comments





0
 
pinkstonmAuthor Commented:
Classy I had family problems and was away from the office THu & Fri I tried it over the weekend and it is not going so well.

Code
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Access & Email Example for Pinkstronm</title>
</head><%
Select Case Request.QueryString("action")
    Case "save"

         set conn = server.createobject("adodb.connection")
         conn.ConnectionString="Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("requests.mdb")&";"
         conn.open
         
         addSQL = "INSERT INTO requests (name, email) VALUES (" & request.form("Name") & ",'" & request.form("Email")
& "')"
         conn.execute addSQL
         
         SendEmailNotification
                           
                       
'Now, we give them the option of returning to your home page.
   %>


<body topmargin="0" marginheight="0" leftmargin="0" marginwidth="0">
<p></P><P align="center">
   <%response.write"<I>Your information has been submitted.   We will respond ASAP.<br><br><A HREF='http://yourhomepage.com'>Click
here to go back to the Home Page</I></A></p>"
 
    Case Else
%>

<form method="POST" action="form.asp?action=save" name="FrontPage_Form1">
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
      <td width="50%"><font size="2" face="Arial">Date: (dd monthccyy)</font></td>
      <td width="50%" colspan="3"><font face="Arial" size="2"><input type="text" name="Date" size="20"></font></td>
    </tr>
    <tr>
      <td width="50%"><font face="Arial" size="2">Requesting Account Manager (name)</font></td>
      <td width="50%" colspan="3"><font face="Arial" size="2"><input
  type="text" name="Acct_Mgr" size="20"></font></td>
    </tr>
    <tr>
      <td width="50%"><font face="Arial" size="2">Requesting Account Manager NetID</font></td>
      <td width="50%" colspan="3"><font face="Arial" size="2"><input type="text" name="Mgr_Netid" size="20"></font></td>
    </tr>
    <tr>
      <td width="50%"><font face="Arial" size="2">E-mail Address&nbsp;</font></td>
      <td width="50%" colspan="3"><font face="Arial" size="2"><input
  type="text" name="Mgr_Email" size="20"></font></td>
    </tr>
    <tr>
      <td width="50%"><font face="Arial" size="2">Telephone</font></td>
      <td width="50%" colspan="3"><font face="Arial" size="2"><input
  type="text" name="Mgr_Phone" size="20"></font></td>
    </tr>
    <tr>
      <td width="50%"><font face="Arial" size="2">Requesting Account/Department</font></td>
      <td width="50%" colspan="3"><font face="Arial" size="2"><input type="text" name="Acct" size="20"></font></td>
    </tr>
    <tr>
      <td width="50%"><font face="Arial" size="2">Account Orgid</font></td>
      <td width="50%" colspan="3"><font face="Arial" size="2"><input type="text" name="Acct_Orgid" size="20"></font></td>
    </tr>
    <tr>
      <td width="100%" colspan="4"><font face="Arial" size="2">&nbsp;</font></td>
    </tr>
    <tr>
      <td width="100%" colspan="4"><font face="Arial" size="2">Enter your Justification for Exemption in the space provided below:</font></td>
    </tr>
    <tr>
      <td width="100%" colspan="4">
        <p align="left"><textarea name="Justification" rows="5" cols="42"></textarea></td>
    </tr>
    <tr>
      <td width="100%" colspan="4"><font face="Arial" size="2">&nbsp;</font></td>
    </tr>
    <tr>
      <td width="50%"><font size="2" face="Arial">Enter number of workstations requiring exemption:</font></td>
      <td width="21%" align="center" colspan="2"><input type="text" name="9x_Exemptions" size="5"> </td>
      <td width="29%"><font face="Arial" size="2">Win 9x</font></td>
    </tr>
    <tr>
      <td width="50%"></td>
      <td width="21%" align="center" colspan="2"><input type="text" name="2000_Exemptions" size="5"> </td>
      <td width="29%"><font face="Arial" size="2">Win NT/2000</font></td>
    </tr>
    <tr>
      <td width="100%" colspan="4"></td>
    </tr>
    <tr>
      <td width="100%" colspan="4">
  <p><font size="2" face="Arial">Current alternative virus protection?</font></p>
  <p><select name="AV Type" size="1">
    <option value="McAfee">McAfee</option>
    <option value="Norton">Norton</option>
    <option value="Other">Other</option>
  </select>&nbsp;&nbsp;&nbsp; <font size="2" face="Arial">Other</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
  <input type="text"
  name="Other" size="20"></p>
      </td>
    </tr>
    <tr>
      <td width="100%" colspan="4">&nbsp;</td>
    </tr>
    <tr>
      <td width="100%" colspan="4">
  <p><font size="2" face="Arial">Describe your current method of updating existing
  anti-virus software:</font><dl>
    <dd><textarea name="Current Method" rows="5" cols="42"></textarea></dd>
  </dl>
      </td>
    </tr>
    <tr>
      <td width="100%" colspan="4">&nbsp;</td>
    </tr>
    <tr>
      <td width="100%" colspan="4">
  <p><font size="2" face="Arial">Enter additional comments in the space provided below:</font><dl>
    <dd><textarea name="Comments" rows="5" cols="42"></textarea></dd>
  </dl>
      </td>
    </tr>
    <tr>
      <td width="100%" colspan="4"><font face="Arial" size="2">&nbsp;&nbsp;</font></td>
    </tr>
    <tr>
      <td width="100%" colspan="4"><font face="Arial" size="2">&nbsp;&nbsp;</font></td>
    </tr>
    <tr>
      <td width="50%" colspan="2" align="left"><input type="submit" value="Submit" name="B6">&nbsp;
        <input type="reset" value="Clear Form"
  name="B7"></td>
      <td width="50%" colspan="2" align="left"></td>
    </tr>
  </table>
  <p>&nbsp;</p>
    </form><%

' This part specifies the format and contents of the email message

Sub SendEmail(strFrom, strTo, strSubject, strBody)
    ' DB and email object vars for email notification
    Dim objCDOMail

         Set objCDOMail = Server.CreateObject("CDONTS.NewMail")

         objCDOMail.From = strFrom
         objCDOMail.To = strTo
         objCDOMail.Subject = strSubject
         objCDOMail.Body = strBody

         ' Send the message!
         objCDOMail.Send
         Set objCDOMail = Nothing
End Sub ' SendEmail

Sub SendEmailNotification()
   
    SendEmail _
                             request.form("email"), "matt.pinkston@eds.com", "A new entry has been
submitted.", _
                             "This person has been added:" & vbcrlf &_
                             "Name: " & request.form("Name") & vbcrlf
                             

End Sub 'SendEmailNotification

End Select
%>
</body>

</html>


My Database is requests.mdb and when i copied it in it go moved to the fdpb directory off the root.

the variables in the requests table are:
reqno
Date
Acct_Mgr
Mgr_Netid
Mgr_Email
Mgr_Phone
ACCT
Acct_Orgid
Justification
9x_Exemptions
2000_Exemptions
AV_Type
Other
Current_Method
Comments





0
 
ClassyLinksCommented:
What EXACTLY is not working?  Please post any error messages.


Remember....this page MUST have the .asp extension, must run on a server with ASP & CDONTS capability.  The database MUST be in a folder with write permissions.  And you CANNOT preview it in the browser.  You must run it through the web server (in PWS by typing 127.0.0.1/yourwebname in the address bar of your browser)
0
 
pinkstonmAuthor Commented:
it gets an error on line 17
0
 
ClassyLinksCommented:
what does the error say?
0
 
ClassyLinksCommented:
Ok..I found a syntax error.   Left out a little '

Change this line....it should be:

addSQL = "INSERT INTO tablename (name, email) VALUES ('" & request.form("Name") & "','" & request.form("Email") & "')"

You can see this form working at http://classylinks.ca/pink/form.asp
0
 
pinkstonmAuthor Commented:
what lines do i change to match the table variables above?
0
 
ClassyLinksCommented:
please email me the db so I don't have to recreate it to test what errors you are experiencing.

eeFPhelp@classylinks.ca
0
 
ClassyLinksCommented:
Ok...first things first.

This line:

addSQL = "INSERT INTO requests (name, email) VALUES ('" & request.form("Name") & "','" & request.form("Email") & "')"


What this is saying is you want to insert name & email into a table called requests and that the db should pull the values from the form fields name & email.

You need to put ALL your form fields in the Values section here and the corresponding table field names in the first bracket.

That is probably what is prompting the error.
0
 
ClassyLinksCommented:
So, assuming all your database fields are text your addSQL would look like this:

addSQL = "INSERT INTO requests (reqno, date, Acct_Mgr, Mgr_Netid, Mgr_Email, Mgr_Phone, ACCT, Acct_Orgid, Justification, 9x_Exemptions, 2000_Exemptions, AV_Type, Other, Current_Method, Comments) VALUES ('" & request.form("reqno") & "','" & request.form("date") & "','" & request.form("Acct)Mgr") & "','" & request.form("Mgr_Netid") & "','" & request.form("Mgr_Email") & "','" & request.form("Mgr_Phone") & "','" & request.form("ACCT") & "','" & request.form("Acct_Orgid") & "','" & request.form("Justification") & "','" & request.form("9x_Exemptions") & "','" & request.form("2000_Exemptions") & "','" & request.form("AV_Type") & "','" & request.form("Other") & "','" & request.form("Current_Method") & "','" & request.form("Comments") & "')"


<that is all on one line>

Let me know how it works.

I say, if all your fields are text because if that date field is a date then you don't need the ' around it in the request.form statement.
0
 
pinkstonmAuthor Commented:
Line is still busted        
addSQL = "INSERT INTO requests (name, email) VALUES ('" & request.form("Name") & "','" & request.form("Email")
& "')"
   
Not Sure what I have wrong    
0
 
pinkstonmAuthor Commented:
I cant differentiate between " and ' above that may be the problem
0
 
pinkstonmAuthor Commented:
All Fields are text except for:
reqno - autonum
Date - date
comments - memo

I have this now:
Select Case Request.QueryString("action")
    Case "save"

         set conn = server.createobject("adodb.connection")
         conn.ConnectionString="Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("requests.mdb")&";"
         conn.open
         
         addSQL = "INSERT INTO requests (reqno, date, Acct_Mgr, Mgr_Netid, Mgr_Email,
Mgr_Phone, ACCT, Acct_Orgid, <BR>Justification, 9x_Exemptions, 2000_Exemptions,
AV_Type, Other, Current_Method, Comments) VALUES ('" <BR>&amp;
request.form("reqno") &amp; "','" &amp; request.form("date") &amp; "','" &amp;
request.form("Acct)Mgr") &amp; "','" &amp; <BR>request.form("Mgr_Netid") &amp;
"','" &amp; request.form("Mgr_Email") &amp; "','" &amp;
request.form("Mgr_Phone") &amp; <BR>"','" &amp; request.form("ACCT") &amp; "','"
&amp; request.form("Acct_Orgid") &amp; "','" &amp; request.form("Justification")
<BR>&amp; "','" &amp; request.form("9x_Exemptions") &amp; "','" &amp;
request.form("2000_Exemptions") &amp; "','" &amp; request.form("AV_Type")
<BR>&amp; "','" &amp; request.form("Other") &amp; "','" &amp;
request.form("Current_Method") &amp; "','" &amp; request.form("Comments")
<BR>&amp; "')"
         conn.execute addSQL
         
         SendEmailNotification
                           
                       
'Now, we give them the option of returning to your home page.
   %>

The error i get is:
Technical Information (for support personnel)

Error Type:
Microsoft VBScript compilation (0x800A0409)
Unterminated string constant
/eit/initiatives/security/exemption_form/form.asp, line 16, column 76


Browser Type:
Mozilla/4.0 (compatible; MSIE 5.01; Windows 98)

Page:
GET /eit/initiatives/security/exemption_form/form.asp

Time:
Tuesday, July 31, 2001, 5:10:07 AM

Line 16 is the line declaring all the variables

0
 
ClassyLinksCommented:
Ok...unterminated string contstant means that you are missing a " on line 16.

If reqnum is an auto number, you can remove it from addSQL...it will be inserted automatically.


Pink....all those <br>'s and &amps are not supposed to be in that line.

Whenever you copy code from EE, paste it into your notepad first.  Then copy it from the notebad to FP's html mode or else you get all the html stuff from this page.
0
 
pinkstonmAuthor Commented:
THis is crazy!  I even formatted it so I could see if anything were offbalanced:

addSQL = "INSERT INTO requests (reqno, date, Acct_Mgr, Mgr_Netid, Mgr_Email,
Mgr_Phone, ACCT, Acct_Orgid, Justification, 9x_Exemptions, 2000_Exemptions,
AV_Type, Other, Current_Method, Comments)
VALUES ('" &amp;  
request.form("Acct_Mgr")
&amp; "','" &amp;
request.form("Mgr_Netid")
&amp; "','" &amp;
request.form("Mgr_Email")
&amp; "','" &amp;
request.form("Mgr_Phone")
&amp; "','" &amp;
request.form("ACCT")
&amp; "','" &amp;
request.form("Acct_Orgid")
&amp; "','" &amp;
request.form("Justification")
&amp; "','" &amp;
request.form("9x_Exemptions")
&amp; "','" &amp;
request.form("2000_Exemptions")
&amp; "','" &amp;
request.form("AV_Type")
&amp; "','" &amp;
request.form("Other")
&amp; "','" &amp;
request.form("Current_Method")
&amp; "','" &amp;
request.form("Comments")
&amp; "')"

I cant get this to work for anything.  Can I email it to ya?

0
 
ClassyLinksCommented:
Got your email.....I'll take a peak when I get through these 282 messages from the backed-up EE mail notifs!  <groan!>

As I said...those &amp ;s have to go.
0
 
ClassyLinksCommented:
Ok...fixed form.asp sent back to you.

There were several issues to clarify.

#1 I assume that the c&p from EE was what input those &amp signs into your code. Each one should have been & request.form("Name") & 

#2 EE also appears to have split up a few of the lines.  That is why you were getting the unterminated constant string error....that is also why I stated above that the addSQL had to be all on one line.  There is a way to split it up, but learn this way first, then you can graduate to the "prettier" code.

#3 You didn't need to have the reqno in the addSQL as it is an autonumber in your db

#4 The date field can remove the ' from around the value in the addSQL statement.

#5 I put the date in the form automatically on load....therefore they don't have to change it and it goes in to the db clean.  <%=formatdatetime(now,vbshortdate)%>

That should do it.

Let me know if you experience any other errors.
0
 
ClassyLinksCommented:
A couple of other things.

When you are naming your form fields...they must be one word.  You can use the _ as you did in some places, but you did leave it out it Current Method and Av Type....this is causing more errors.


Oh, and one more thing.

You CANNOT name an access field or form field Date.  Date is a reserved value.

Emailing you working copy with all of the above incorporated.
0
 
pinkstonmAuthor Commented:
Excellent Excellent Excellent!

CLassy is the best....
0
 
ClassyLinksCommented:
Glad to get it all straightened away Pink.

You'll want to stop by www.ASP101.com or www.activeserverpages.com and get a jump on some ASP.  The Experts in the ASP forum here at EE are great too.

Thanks for the A.  See you next time!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.