473,699 Members | 2,141 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with login Form

yoda
291 Contributor
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.Set Focus
SendKeys "{Home}+{En d}"
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)
Jan 7 '07 #1
11 2083
yoda
291 Contributor
Sorry i figured it out just Any Hour a go sorry to trouble you guys

Se ya

Yoda (Canada Eh)
Jan 8 '07 #2
Killer42
8,435 Recognized Expert Expert
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.
Jan 8 '07 #3
yoda
291 Contributor
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
Jan 8 '07 #4
Killer42
8,435 Recognized Expert Expert
...the only change was If txtPassword = txtPassword
I guarantee that this test will always return True, no matter what.
Jan 8 '07 #5
seshu
156 New Member
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
Jan 9 '07 #6
hariharanmca
1,977 Top Contributor
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.Set Focus
SendKeys "{Home}+{En d}"
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
Jan 9 '07 #7
daveftl
43 New Member
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.Connectio n
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

.ConnectionStri ng = "provider=Micro soft.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.mnuLog In.Enabled = False
dave.Close

End Sub
+++++++++++++++ +++++++++++++++ +++++++++++++++ ++++++++++++
+++++++++++++++ ++++ Nothing Follows++++++++ +++++++++++++++ +++
Jan 9 '07 #8
yoda
291 Contributor
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
Jan 9 '07 #9
yoda
291 Contributor
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
Jan 9 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

6
3411
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 cust_pass='test123'' at line 1 I'm using a database called test here is mysql table:
1
2489
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 the institution databank to avoid frauds on my system. The idea is to build a "new user register page" and with a CPF field. So, when the person enter his CPF, the ASP page would check on the institution databank and validate or not the...
4
2003
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 should then have access to those user properties. I am not getting the property value from user that was set in form1. Sorry for posting so much code but I need help bad. How do i make this work? Thanks Mike
8
1575
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?
15
2285
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 non-blank. If there is no user name, an appropriate error message must be displayed. All of the following passwords are valid IT160, VB2Manager, BackDoor. No other password is valid. It must allow the user to enter the password in any case. If...
4
7848
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 problem is that the login form stays open. I put a me.close (in the login form) after opening the main form but that seems to close everything and the main form is not displayed. I thought I could call a Sub Main() that calls the login form, closes...
23
2788
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 place a link on there site so people can vote for their program, "ad a click". eg someone clicks the link on some page and it counts +1 click on my page. if some one clicks the link below it will count a click on my page.
6
3354
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 the past in other places, and while the help was much appreciated, it seemed everyone just wanted to 'theoretically' explain how to do it, but when I tried to do it myself, I couldn't login. I want to simply pass the email address and password to...
1
1700
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: <!DOCTYPE html PUBLIC "-//W3C/DTD XHTML 1.0 STRICT//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <HEAD> <link rel="stylesheet" type="text/css" href=file:///c:/html/web2.css /> <SCRIPT LANGUAGE="JavaScript">
13
4167
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 the progress and I hope you guys will help me. The code below is what I have so far. Just put two scripts in the same directory and that is! I hope you will help me Thanks! class.php <?php //php login sytem class LoginRegister{ function...
0
8705
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9054
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8943
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8899
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6550
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5884
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4391
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3075
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.