Hello, and welcome to vbForums!

if you login with no password it works but
The reason is could be much more simple than you think. The filepass is empty all the times!

Can you please show to us, the MySQLQuery() method? Maybe you just use it in the wrong order, that is causing the value 'filepass' will not contain the password never.
ps: A quick tip. Use the VB6 ide window, to intent your code, by using the TAB button, that helps to the others to read your code.