I have an Edit Onload Event (given below) that works on your demo server but doesn't work on my webserver.
Any ideas what I can do to fix it? Do you think it might be because it's a "sub" and I'm missing something on my server?
Thanks for any help.
Sub EditOnLoad()
' Parameters:
' where - string with WHERE clause pointing to record to be edited
'** Check if specific record exists ****
str = "select from " & strTableName & " where " & where
set rsInfo = Server.CreateObject("ADODB.Recordset")
rsInfo.Open str,dbConnection
set rsExists = Server.CreateObject("ADODB.Recordset")
rsExists.Open "select from QrySListAuth where EmpKey='" & rsInfo("EmpKey") & "' and CampusAuth='" & rsInfo("Campus") & "' and MonthAuth='" & rsInfo("MonthTC") & "'", dbConnection
if not rsExists.eof then
Response.Redirect "StaffTimeCard_list.asp"
else
Response.write "Please make changes to the entry and click on Save when finished."
end if
rsExists.Close : set rsExists = Nothing
End Sub