Submitted by princenathan on Friday, July 9, 2010 - 16:37.
Private Sub log_in( )
if text1.text=("nathan") and text2.text=("cute") then
form2.show
me.hide
else
msgbox "sorry try to review ur username and password
End sub
!! 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!!
Hi,
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!
Romie....
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
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"
db.Open
End Function
Public Function SetRs()
rs = New ADODB.Recordset
rs.Open sql, db, AdOpenStatic, AdLockOptimistic
End Function
Public Function CloseCon()
db.Close
Set db = nothing
End Function
Public Function CloseRs
rs.Close
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()
SetCon
sql="select * from tblUsers where Username='" + Text1.Text + '" and Password='" + Text2.Text + "'"
SetRs
If rs.RecordCount > 0 Then
Unload Me
frmMain.show
Else
MsgBox"ERROR",vbCritical
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 +
SetRs
If rs.RecordCount > 0 Then >>error message "operation is not allowed when object is closed"
Unload Me
frmMain.show
Else
MsgBox"ERROR",vbCritical
End If
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
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.....
guys can you help me..
im a comp prog student
sont know how to conncect my vb 6.0 in my access
im using adodc.hope you can help me huhu msg me @ [email protected] tnx guys
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!!!
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.