Try this way query1 = "Select Count(Us_User) from SC_User Where Us_User='" & User & "' and Password='" & Pass &"'"..