How do i use a preset password on my visual basic program that will check first the username and and then the password and make sure that if username is this then the password should be that...

U must go with 'if else' conditions-

if 'object' = 'username1' then 
 if 'object'='password' then 
 login = true
 login= false
 msgbox"plz enter valid password for this user"
 msgbox"plz enter valid user name"

where 'object' is a filed of your database containig the username and password or may be you can use textbox.

if u r using textbox then u must specify the user name and password in the coding or use a inputbox to modify lateron.

I m not elaborating much hope u understand.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.