I commented out the authentication (as that is what the input box is for) And the SQL works fine. I commented that out too.
<HTML>
<HEAD>
<TITLE>BLAH</TITLE>
<Script Language="VBScript" Runat="server">
Dim inputWO
Dim strAccess
Dim myConn
Dim myRecordset
Dim DB_Connect_String
Dim strSurveyMail, rstSurvey, strWorkOrder
DB_Connect_String ="driver={SQL Server};server=servername;database=name"
'Set myConn = CreateObject("ADODB.Connection")
'set myRecordset = CreateObject("ADODB.Recordset")
'Set the connection properties to point to work order database'
'myConn.Open = DB_Connect_String
'strSurveyMail = <select statement here>
'myRecordset.Open strSurveyMail, myConn
'Set rstSurvey = myRecordset
Sub window_onload
inputWO = Inputbox("Enter your Work Order Number")
'If not empty, then continue'
'If Not (rstSurvey.Eof and rstSurvey.Bof) Then
'While Not rstSurvey.Eof ' *Loop through all work orders that need surveys'
'strWorkOrder = rstSurvey("Work_order_number")
'If CLng(inputWO) = CLng(strWorkOrder) Then
'strAccess = <update statement>
'myConn.Execute strAccess
msgbox "Thank you. Please continue."
WorkOrderNumber.Value = inputWO
'MyConn.close
Exit Sub
'End If
'rstSurvey.MoveNext
'Wend
'MsgBox "Sorry. That work order number has either already been surveyed, or has not been selected for a survey." , vbOKOnly, "Incorrect Work Order Number"
'location.href="IT Survey.htm" 'error page if not correct'
'Else
' location.href="IT Survey.htm"
'End If
'MyConn.Close
End Sub
</Script>
<form action="
method="post">
<META content="Microsoft FrontPage 5.0" name="GENERATOR">
<META content="FrontPage.Editor.Document" name="ProgId">
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</HEAD>
<BODY>
<input type="hidden" name="WorkOrderNumber" id="WorkOrderNumber" >