Object Required Error when using MoveNext
Hello To All,
I am experiencing a problem when using the movenext command to populate a drop down. I receive the following error:
Microsoft VBScript runtime error '800a01a8'
Object required: ''
The error occurs at the movenext command. Here is my code:
Response.Write "<td><select size='1' name='ServiceTagID'><option></option>"
While Not rstServiceTag.EOF
Response.Write "<option value=" & rstServiceTag("ServiceTag") & ">" & rstServiceTag("ServiceTag") & "</option>"
rstEmployee.MoveNext
WEnd
Response.Write "</select></td>"
Now I read on the internet that if your current record is your last record the movenext command will give you an error. In my case, most times this drop down will only have one option (making the current record the last record). The reason I use a drop down is because on occasion depending on the previous input there may be more than one service tag.
Any suggestions on how I can fix this?
Thanks.
|