Alltrim(Users.Password)==Alltrim(thisform.txtPassword.value)This will fail to validate correctly if the textbox is empty, that why my suggestion was to pad the textbox value with spaces on the right to be the same length as the field and not use the trimmed versions.