This is a database-issue, not an ASP-one. NULL-values in a database (even in text-fields) are not the same as empty strings! In MS Access, I think there is an option of allowing a text-field to contain empty values (e.g. ""). But its always a good idea to check for NULL. In VBScript: if IsNull(q1) then, in JScript as you did, I think (never used JScript in ASP myself).