Make a Username and Password in VB 6.0

Submitted by: 
Visitors have accessed this post 93139 times.
  1. Private Sub log_in( )
  3. if text1.text=("nathan") and text2.text=("cute") then
  4. form2.show
  5. me.hide
  6. else
  7. msgbox "sorry try to review ur username and password
  8. End sub


elow to evry1,,,,jejejejejejeje


just Send your msg at my yahoo account/FB: [email protected]

System Developer and Web Developer

>Programming in The Future Technology<




just Send your msg at my yahoo account/FB: [email protected]

System Developer and Web Developer

>Programming in The Future Technology<

what is the shortest way in making databse in vb?

... can u make a very simple payroll simple.?...

i have simple payroll system!!

how to make change password and username in vb6 thx!!!

!! are you a software Developer!? are you? !! if you are can you teach me how to create or how to make a VB !! its very difficult to me to create! because my Instructor very poor on teaching VB!!

how to compute age in vb 6.0 using combo box????

bro i pano po ba yung inventory system? kahit simple lang ..

i have connected vb to access using ADODc.the password and username was stored in access,,,can you help me with the codes.?tnx

you first step u need to make adob connection,,,, means vb 6.0 connect database access


just Send your msg at my yahoo account/FB: [email protected]

System Developer and Web Developer

>Programming in The Future Technology<

I can Use adodb connection . :)

Please help me create a vb 6 code that requires a user to log in. Hisr username and password are stored in an ms access table. Everytime he logs in, that table is searched for the corresponding username and password; if successful, form1 is opened; if not, the program displays a username and password misatch error message and allows the user up to 3 attempts before it closes the program.

Also, please include a code that allows the user to change his password.

Many thanks and God bless!


are baba mazya dok khau nako

is it possible that the password appear as an asterisk "*" for the security of the user.

yes.. it is possible

yes it's possible to show ur password as " * " .
If u wanna 2 show password in TextBox, firstly...... click on the textbox properties.....

& in this u see a option "Password" , then in this u type anything in this field by which u wanna 2 show ur password

Saurabh Chauhan

ya it worked :)

Hi Romie do you want the full coding for this
the explanation of how it is done

i also want to know how to connect access in vb 6 and the codes for the log in. please help me. email me. [email protected] i really need help.

To use ADODB go to Project>Reference>Find Microsoft ActiveX Data Object 2.0

For me, I use modules. The Login.mdb here is the database name and has a tblUsers. Here is the code:
Public db As New ADODB.Connection
Public rs As New ADODB.Recordset
Public sql as String

Public Function SetCon()
db = New ADODB.Connection
db.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\Login.mdb"
End Function

Public Function SetRs()
rs = New ADODB.Recordset
rs.Open sql, db, AdOpenStatic, AdLockOptimistic
End Function

Public Function CloseCon()
Set db = nothing
End Function

Public Function CloseRs
Set rs = nothing
End Function

Then on the frmLogin, put 2 textboxes and a command button. Textbox1 is for the Username and Textbox 2 for the Password. Here is the code for command button:

Private Sub Command1_Click()
sql="select * from tblUsers where Username='" + Text1.Text + '" and Password='" + Text2.Text + "'"

If rs.RecordCount > 0 Then
Unload Me
End If

Happy coding.
Regards >>> Cidfrey here

hi guys! can you help me in my mini system?
i don't how to create a daily time records of employees using vb.06 and database. pls help me with my codes.

--chee :(

had to change your code here too due to some error

Public Function SetRs()
Dim rs As New ADODB.Recordset >>this line
rs.Open sql, db, adOpenStatic, adLockOptimistic
End Function

sql="select * from tblUsers where Username='" + Text1.Text + '" and Password='" + Text2.Text + "'" >>>here ' and " has been misplaced after + Text1.Text +

If rs.RecordCount > 0 Then >>error message "operation is not allowed when object is closed"

Unload Me
End If

it did'nt work...

this is a short step on how to connect MS Access to Vb6 Follow
Project>Reference>Find Microsoft ActiveX Data Object 2.7 Library
at my case i use 2.7 library

if you want the brief tutorial just follow this http://code-brigade.blogspot.com/2010/07/how-to-connect-ms-access-database-in.html


how to find the code of delete

Delete of ?

we need a POS System could u plz help us in our program?tnx..email me at [email protected]
vb 6.0

hi....can you help to make a simple payroll system using vb 6.0...pls....i need it this week...thanks to your reply..

-- can you plz give a sample code for the Querying in SQL
___INNERJOIN the 2 table in the database

SELECT.................... FROM INNERJOINON=

SELECT,,........................FROM WHERE.=.AND ORDER BY

can you post codes or even videos
of VB 6.0 using database connection
not using a modules as connection....

hi to every1 give your topic about the programming

hey frens i doin a project in which my frontend is vb n backend oracle(sql). i hav a form in vb for changing the password n i have specified the username n password in sql by creating a table for the it . can any 1 plz send me the code to change the existing password.....

hi can you help me please for how to retrive data from textbox control to database in vb.net...........

1.create a database file
2.in vb project-->standard exe>
establish connection to database
and the
'rst is a record set

Select * from Booking
Where bookingDate>Date() and showDate>date;

could you please give me a perfect username-password codes.....?

how can i use a combo box in username, i don't know how can apply that can you help me pls..

can anyone help me on how to make a code with username and password?!
the condition is:
if username is right and password is wrong the output is "INVALID PASSWORD"
if username is wrong and password is right the output is "INVALID USERNAME"
if username and password is wrong the output is "ACCESS DENIED"
if username and password is right the output is "ACCESS GRANTED"

IF login attempts more than 3":
in 4x attempt the output is "INTRUDER ALERT"
In 5x attempts the output is "SYSTEM LOCK"

Can anyone help me???!!!
tetsudatte kuremasuka?
domo arigatou!!!

I have create a a project, bt I don't know codes for reset password window. Plz help me, I need it immediately..

can you help me identify all the tables/entities to be
use in the payroll system ?please . so that i can normalize the relationship for
these :( help me.

plz sent my no. 09306492326

can u help me make a username and password in visual foxpro 6.0?

hi can u help me hotel reservations system

thanks for this concept of vb


Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <th>
  • You may insert videos with [video:URL]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.