OK, I have figured it out but it was something I would never have
suspected.
The year was coming from a select list on the search page which was
generated by a for loop:
currentyear = Right(Date, 4)
for i=2000 to currentyear
Response.write "<option value=" & chr(34) & i & chr(34) & ">" & i
next
The variable "i" was being used by the for loop presumably as a number
so that it may be incremented.
When a year is selected, it is added to the QueryString as nryear=2003.
Because my book (a poor one but all I have) tells me that
Request.QueryString will bring in 2003 as a string, I didn't think it
had to be converted from a number into a string but for some reason,
because currentyear is a number, it seems that the numeric property of
nryear was being carried through.
When I changed the currentyear statement to
currentyear = Right(CStr(Date), 4)
all the problems cleared up.
Yes, the problem was in the query string but appears to be a function of
the property of nryear when the option loop was being generated.
Thanks for your help,
Jules
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!