The code is:
Option Explicit
Public LoginSucceeded As Boolean
Private Sub cmdCancel_Click()
'set the global var to false
'to denote a failed login
LoginSucceeded = False
End Sub
Private Sub cmdOK_Click()
'check for correct password
If txtPassword = "" Then
'place code to here to pass the
'success to the calling sub
'setting a global var is the easiest
LoginSucceeded = True
Else
MsgBox "Invalid Password, try again!", , "Login"
txtPassword.SetFocus
SendKeys "{Home}+{End}"
End If
End Sub
I want to make it so if the user puts in their password and it works, but i have tried
"Private Sub cmdOK_Click()
'check for correct password
If txtPassword = 0 Then
'place code to here to pass the
'success to the calling sub
'setting a global var is the easiest
LoginSucceeded = True"
But it didn't work please Help anybody
Yoda (Canada Eh)
11 2068
Sorry i figured it out just Any Hour a go sorry to trouble you guys
Se ya
Yoda (Canada Eh)
Sorry i figured it out just Any Hour a go sorry to trouble you guys
:) That's probably the best result for everybody.
These archives are a great source of information. So for future reference, could you give us some idea of how you resolved the problem? That way it will be here if someone else comes looking for the same answer.
I answer was
Private Sub cmdOK_Click()
'check for correct password
If txtPassword = txtPassword Then
'place code to here to pass the
'success to the calling sub
'setting a global var is the easiest
LoginSucceeded = True"
so when some bdoy logins in it uses their password instead of the one you made up.
the only change was If txtPassword = txtPassword
...the only change was If txtPassword = txtPassword
I guarantee that this test will always return True, no matter what.
Hi this is seshu
i have both of your conversation, i was thrown into dilema as for as i know ever login form interacts with data base and in the above code i have not seen any data base connection or any such parameter so if there is any way such please help me out
The code is:
Option Explicit
Public LoginSucceeded As Boolean
Private Sub cmdCancel_Click()
'set the global var to false
'to denote a failed login
LoginSucceeded = False
End Sub
Private Sub cmdOK_Click()
'check for correct password
If txtPassword = "" Then
'place code to here to pass the
'success to the calling sub
'setting a global var is the easiest
LoginSucceeded = True
Else
MsgBox "Invalid Password, try again!", , "Login"
txtPassword.SetFocus
SendKeys "{Home}+{End}"
End If
End Sub
I want to make it so if the user puts in their password and it works, but i have tried
"Private Sub cmdOK_Click()
'check for correct password
If txtPassword = 0 Then
'place code to here to pass the
'success to the calling sub
'setting a global var is the easiest
LoginSucceeded = True"
But it didn't work please Help anybody
Yoda (Canada Eh)
The code you written is if he didn’t enter password then it will Login. Just explain briefly
Hi Seshu!
i got a code with regards on login that connects to DB...hope this could help you , GOD BLESS!
++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++
Option Explicit
Dim dave As New ADODB.Connection
Dim gay As New ADODB.Recordset
Dim gave As Boolean
Private Sub Form_Load()
Me.Width = 5235
Me.Height = 3135
'Initialize boolean
gave = False
End Sub
Private Sub cmdSignIn_Click()
'Connection String
With dave
.ConnectionString = "provider=Microsoft.Jet.OLEDB.4.0;data source=" & App.Path & "\db1.mdb"
.Open
End With
Debug.Print " Connection Created "
'set recordset
gay.Open "Select * from security", dave, adOpenDynamic, adLockReadOnly
Debug.Print "recordset created"
Do While gay.EOF <> True
If gay(0) = txtUser.Text And gay(1) = txtPass.Text Then
gave = True
Exit Do
End If
gay.MoveNext
Loop
If gave = True Then
Call forUnload
Else
MsgBox "Invalid Username and/or Password", vbInformation, "3ten systems"
End If
MDIForm1.mnuLogIn.Enabled = False
dave.Close
End Sub
++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
+++++++++++++++++++ Nothing Follows++++++++++++++++++++++++++
Hi this is seshu
i have both of your conversation, i was thrown into dilema as for as i know ever login form interacts with data base and in the above code i have not seen any data base connection or any such parameter so if there is any way such please help me out
Sorry Seshu there is no database be i am just a beginer and don't know to yet
Sorry Yoda Canada Eh
P.S i'm just in high school
The code you written is if he didn’t enter password then it will Login. Just explain briefly
Its just a prank for the teachers at my school including students. i'm just in high school
Yoda Canada Eh
hi, your only @ high school?, okey i see,if you want you could use this codes:
txtbox1.text=txtbox1.text' i think it would be better not to use this line of code if you like someone not to gain access with your program, this would only mean that whatever that person enters in the txtbox will be validated and set to true, that in result they could enter your program.
you could use 2 txtboxes instead and write these codes to login button,
dim a, b string
dim 2 as new form2
a="username" ' in this line you could set the username of the person for validation
b = 'P@ssw0rd" - everytime the person try's to log in thier acct they must specify the right password
if txtbox1.text="username" and txtbox2.text= "P@ssw0rd" then
messagebox.show("Welcome " & a)
2.show
me.hide' closes the login application and proceeds to the next form if and only if validated..
you could play to these codes.. and set some assess burnin...
have a good time,
Yo dude nice i actually know what it means and see what i can do thanks.
Yoda
Canada Eh
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Dal |
last post by:
Help! I'm trying to get a login script to work.
I get this error message
MySQL Login Error: You have an error in your SQL syntax near
''jvsd0001_customers` WHERE cust_name='testuser' AND...
|
by: Caliangelas |
last post by:
Hello,
I need a routine to check for a number called CPF (just like Social
Security Number in USA). I already have a validation routine for that
number, but I still need to check if it exists on...
|
by: Mike |
last post by:
Please help this is driving me nuts. I have 2 forms, 1 user class and I am
trying to implement a singleton class. Form 1 should create a user object
and populate some properties in user. Form2...
|
by: revathi |
last post by:
Hi,
I have created servlet program using Netbeans.I have also written the
JDBC connectivity.But FileNotFoundException is arising.Can someone help
me?
|
by: carr4895 |
last post by:
Hello.
I was wondering if someone could help me too with a login form. Upon
startup, I have to display a password screen and it should accept a
user name and password. User name can be anything...
|
by: Johnnie Miami |
last post by:
I'm using VB.Net 2005 beta 2 and have my login form (login.vb) specified as
the startup form. If the user is successful logging in, I call my main form
(main.vb). This all works fine but the...
|
by: casper christensen |
last post by:
Hi
I run a directory, where programs are listed based on the number of
clicks they have recieved. The program with most clicks are placed on
top and so on. Now I would like people to be apple to...
|
by: AppleBag |
last post by:
I'm having the worst time trying to login to myspace through code. Can
someone tell me how to do this? Please try it yourself before replying,
only because I have asked this a couple of times in...
|
by: Tarcetial |
last post by:
Im trying to make a personal website with a log in/registration system. I found some help with the log in and now i just need some help with the registration. This is the coding im already using:
...
|
by: Apostle |
last post by:
Hi all, after thinking for sometimes, I thought it will be great opportunity to learn if I will start from scratch and build my own register/login system. Here is the thread that I will be posting...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |