mat757
06-05-2006, 08:14 AM
I am trying to populate a form text box with an employee ID from an access database using a button in a vbscript. When I click the button at runtime I get the following error:
"Error Oject Required: objrs" objrs is the record set I pull out of the database.
I have included the code used below:
<!--#INCLUDE VIRTUAL="/includes/connection.asp" -->
<!--#include virtual= "includes/adovbs.inc"-->
<script LANGUAGE="vbscript">
Option Explicit
DIM mySQL
Public objRS
mySQL = "SELECT * FROM Employees"
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open mySQL, objConn, 3
sub cmdID_OnClick()
document.frmWOrequest.txtEmployeeID.value = objRS.Fields.value("EmployeeID")
end sub
Does anyone see what I'm doing wrong ?
Thanks.....
</script>
</head>
"Error Oject Required: objrs" objrs is the record set I pull out of the database.
I have included the code used below:
<!--#INCLUDE VIRTUAL="/includes/connection.asp" -->
<!--#include virtual= "includes/adovbs.inc"-->
<script LANGUAGE="vbscript">
Option Explicit
DIM mySQL
Public objRS
mySQL = "SELECT * FROM Employees"
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open mySQL, objConn, 3
sub cmdID_OnClick()
document.frmWOrequest.txtEmployeeID.value = objRS.Fields.value("EmployeeID")
end sub
Does anyone see what I'm doing wrong ?
Thanks.....
</script>
</head>