Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,158,164 members, 7,835,900 topics. Date: Tuesday, 21 May 2024 at 05:08 PM

Need To Get This Vb6 Code Working, Pls Help! - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Need To Get This Vb6 Code Working, Pls Help! (1092 Views)

Login Code In Vb6.0 / Install Vb6 Application On Android / Help me convert this Vb6.0 code To Vb.net (2) (3) (4)

(1) (Reply) (Go Down)

Need To Get This Vb6 Code Working, Pls Help! by skoten(m): 5:42pm On Apr 11, 2011
Hello,

Want to know how to embedded access database into my application.The user require to enter default password then later change it when he/she gain access into the application or is there any other way i can do it

Please someone should help me

this is the code


Private Sub butOK_Click(Index As Integer)
Dim Password As String
If txtPassword.Text = "" Then
MsgBox "Invalid Password,try again!", vbOKCancel + vbCritical, "Login Error"
Else
If txtPassword.Text <> 1234 Then
MsgBox "Incorrect Password", vbCritical, "Login Error"
Else
If txtPassword.Text = 1234 Or FrmLogin.txtPassword = FrmChangePassword.txtReconfirm Then
Me.Hide
FrmMenu.Show
End If
End If
End If
End Sub
Re: Need To Get This Vb6 Code Working, Pls Help! by dellnet: 6:07pm On Apr 11, 2011
This is just to change access password.

Sub ChangeDBPassword ()
Dim Db As Database

Set Db = OpenDatabase("C:\MyDB.mdb",True, _
False,";pwd=1234"wink
Db.NewPassword "1234","newpassword"
Db.Close
MsgBox "Password Changed", vbok, "Password"
End Sub

Refrence Microsoft DAO Object Library for the code above to work.
Re: Need To Get This Vb6 Code Working, Pls Help! by skoten(m): 12:18pm On Apr 13, 2011
thanks dell_net,i will try your code and get back to you
Re: Need To Get This Vb6 Code Working, Pls Help! by findam: 12:31am On Apr 14, 2011
to login try,

Private Sub butOk_Click()
if txtpassword.text <> "" then
if txtpassword.text = 1234 then
FrmMenu.show
Me.hide
else
MsgBox "Invalid password", vbCritical , "Error"
me.txtpassword.setfocus
end if
else
msgbox "Invalid Username", vbCritical , "Error"
me.txtUsername.setfocus
end if
End Sub
Re: Need To Get This Vb6 Code Working, Pls Help! by skoten(m): 5:53pm On Apr 14, 2011
thanks findam,i also need it to connect to database.
Re: Need To Get This Vb6 Code Working, Pls Help! by Bossman(m): 7:22pm On Apr 15, 2011
If you need help with that, google for "connecting to MS Access from visual basic". This is is a common functionality back in the days, so you will get plenty of hits.

skoten:

thanks findam,i also need it to connect to database.

(1) (Reply)

Am I Right Or Wrong / Can Someone Please Help Me With This Python Program? / Urgent Help On E-tutor Design

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 9
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.