I'm guessing that the query you're having problems with is this one. If not, you can dissregard the rest! 
Code:
If Request.form("spec") <> "" Then
sqlstring = " SELECT Personnel.*, specialists.spu_id " & _
" FROM Personnel, specialists " & _
" WHERE Personnel.p_id = specialists.p_id " & _
" AND specialists.spu_id = " & CInt(request.form("spec"))
End If
First, my guess it that Request.Form("spec") is empty. Since you never check it before the query, you don't know what's in there. If it's empty, or something other than a number, you're in trouble.
Second, you should avoid joins like you have them written. This approach is usally more acceptable, and faster:
Code:
SELECT p.*, s.spu_id
FROM Personnel p INNER JOIN specialists s
ON p.p_id = s.p_id
WHERE s.spu_id = 8
It also might be helpful if you posted the error you're getting.
Bookmarks