Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Create A Login Screen


hey.i need help creating a login screen in vb.i have a form where users have to log in first with a username and password.the username and password are already supplied in a database and my form contains two option buttons, doctor and staff.so if a user selects staff, it has to connect to the staff database.how exactly do i write the codes to connect to the database? i'm not familiar with the database part of vb.plz help.thanks in advance.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Disable Screen For Login Screen
hi i was wondering if anyone nos how to disable all but the current form on the desktop.

Any ways on how to do this will be welcome !!!!!

Login Screen
Ok, I read the thread about my game... Rather rude what some people said... But I am still going on with the game. With this forum, and my genius ability to try, I WILL MAKE AN ONLINE 3D MULTIPLAYER GAME!!! So, now I need help with the login screen... Anybody know how to make one??? I'm so troubled with this, I know once I do this the graphics, collision, health, and several other things. I know directx4vb has alot. Ok, now please help me with this login screen. You got me there with the datpwcheck thing, but it won't work. I'll put up the source codes again. Thanks. And please help me with this. Thank you if you try... Oh, I removed the .exes, but if they are still there... SOMETHING IS WRONG WITH WINZIP!!! NOOOOOOO!!!

Run At/before Login Screen...
I know this has probably been asked a few times, but I haven't beenable to locate it.

I need to beable to start a program when Windows Login screen comes up. How can I add it so it starts when the Windows Login screen shows up. Any thoughts?

Login Screen
hi
i have a login screen and want the user to attempt the right login only thrice after which it should end the application.
can anyone help
aarti

Login Screen... ? [please Help]
Hello, I've searched the forums, but I can't find an exact answer (either that or I am the worst when it comes to seach criteria )

I am totally stumped and I need this for a school assignment. What I want to do is make a login screen.
I want to make it so the username and password entered is looked up in a database (excel? whatever is easier ) when the cmd_login button is pressed.

Once again, I have searched the forums but I couldn't find a direct answer

Thanks guys!

Ant

Login Screen
Ok, a few of you have been to the other forum with me' login screen problems. I know i have to use a Data Environment, but the coding, it's still messed up. I'll put up the code for it. PLease put up the codes i need and explain how i access the file with VB.

Login Screen
Good Morning,

I have a Login Screen and a Access Database. In the database there is a table called "Login" there is a username, password, and a boolean for security. How would I write a select statement to access the database, and pull data from a any of the roe's ( and match it with the username and password? If the data from a row matches the login screen will close and another screen will open? How would I do all that?

Thanks,

Login Screen
hi,

i've made a login screen which includes 2 textboxes (txtPassword, txtUsername). i have create a database which has a table called accounts with 4 fields in..

Account ID
Account Type
Username
Password

when i hit the command button on my form i want it to check the database for the username and password inputted into the text boxes.

Anyone got the code?

Login Screen
I have my login screen working but i have a problem, i want the user to only have three attmpts to login with the username and password before being logged out, i think i have to use a static variable, anyone got any ideas?

Login Screen
I need to create a login screen but I dont know how? Basically, on the first screen I want a field username and password. THen the user fills it in and takes u to the next screen.

Has VB got anything embedded in the system that can do this for me?

Step to step guide?

Thank u

Login Screen
hey people i've created a login screen but when i run the program it starts at the main menu form, any ideas why, any help would be appreciated.

Login Screen
Hello Everybody

Can some one send me code to pass the loginscreen values into my connection
i am planning to use the default ODBC login screen

Please someone help me

Thanks,
Rag58

Login Screen
I have written a login form that connects to an ACCESS database (using DAO). It contains a
USERNAME combo drop-down and a PASSWORD textbox. The combo drop-down is populated in
the Form_load event by selecting all usernames from the LOGIN table. Eventually, the field (Password)
on the databse will store an encrypted password.

However, in order to save an encrypted pasword to the database I need another form to
add it. Hence, what I am trying to do is when a user doesn't enter a password in the
PASSWORD textbox and the equivalent password field on the database for that user is
empty(not set-up) I want to show another VB form so that a password can be set-up,
encrypted and saved to the database.


Here is part of the code:

Dim rs as Recordset
Dim sSQL as String
Dim sTemp as String

...
...
...
...

    Set rs = db.OpenRecordset("Login", dbOpenDynaset)

    sTemp = "'" & cboUserName.Text & "'"
    sSQL = "SELECT username, password FROM Login WHERE username = " & sTemp

     
          If txtPassword.Text = "" Then
          
                Set rs = db.OpenRecordset(sSQL)
                
                'How should I check the return value
                If rs.Fields("password") = "" Then
                    frmAddPassword.Show vbModal
                Else
                    MsgBox "Invalid Password, try again!", vbCritical, "Invalid password"
                    txtPassword.SetFocus
                    txtPassword.SelStart = 0
                    txtPassword.SelLength = Len(txtPassword.Text)
                End If
            End If

However, even though the passsword field is not set I get the Error message displayed.
Should I not check rs.Fields("password") = "" ?????

Is this the best way to implement this? Any advice on how to code this in a better way or examples
will be strongly appreciated.


Thanks

XP Login Screen
Hi All,

I've written some software that authenticates a user using a 3rd party device via usb/rs232.

I need to automatically amend the logon script of winxp such that when a user boots the pc as well as getting the standard username/ password option they also receive an option to logon using my device.

So first is how do I change the windows logon screen to allow this and secondly assumiing the users pass authentication using my device, how do I then tell the PC to continue booting up the user preferences etc.

Disable Ctrl+alt+del For And Ctrl+tab In Login Screen And How To Make A Screen
how i can disable Ctrl+alt+del for and ctrl+tab in login screen
accept user can put the correct username and password to login
 to the desktop

and how i can make one screen to close the desktop,
 just give user only can put they password and
username (textbox)can unlock the screen.coz what i
do before this is just using form to display all the screen,
so when i logoff or switch user, i still can c the taskbar,
and using Crtl+del+alt to close the form.....

Login Screen Attempt
I am trying to make a login form that will look in an access database for the user and password. I am getting an run-time error.

Private Sub cmdLogin_Click()
'Verify that the password is correct and enter the search form.
If Login.HScroll1.Value = 2 Then
End
End If
If Login.txtUser.Text = "" Then
Login.HScroll1.Value = Login.HScroll1.Value + 1
Exit Sub
End If
If Login.txtUser.Text = "" Then
Login.HScroll1.Value = Login.HScroll1.Value + 1
Exit Sub
End If

Login.Data1.Recordset.FindFirst "Login = '" & Login.txtUser.Text &
"'"
If Login.Password.Caption = Login.txtPassword.Text Then
MsgBox "Login Successful!"
Login.Login.Caption = ""
Login.Password.Caption = ""
Login.txtUser.Text = ""
Login.txtPassword.Text = ""
Exit Sub
End If
MsgBox "Login Unsuccessful!"
Login.txtUser.Text = ""
Login.txtPassword.Text = ""
Login.HScroll1.Value = Login.HScroll1.Value + 1
End Sub


In my access database I have two fields.
One is named Login
and the other is Password

I created the data box and the hscroll

When I run the program and type in the user and password I get a debug
error

Run-time error '424'

Object required

I hit debug and this is the line that is highlighted in yellow.

If Login.HScroll1.Value = 2 Then

Any ideas?

Login Screen Using A Mdb Database
Hello,

i've got a question, i'm trying to make a login screen wich uses a access database.
i'm not so good at it yet, i'm a student you know.

can anybody help me?

thx

greetz

New Prompt On Login Screen
I have a vb6 program that kicks off IE and proceeds to login using an id and password

Private Sub log_me_in() ' PAGE #1 - log into AAIS
'''''''''''''''''''''''''''''''
If check_page(doc_text, "LOGIN_FORM", True) Then
Set myitem = IE.Document.All.Item("USER")
myitem.Value = uid
Set myitem = IE.Document.All.Item("PWD")
myitem.Value = upass
Set myitem = IE.Document.All.Item("LOGIN")
myitem.Click
Else
jobs_clear find_error & " LOGIN"
End If
End Sub

This worked great till they put an alert in front of it.
<body bgcolor='#FFFFFF' marginheight=0 marginwidth=0 leftmargin=0 topmargin=0 onUnload='clean()' onLoad='cpiBanner()'>

How can I access this item (the alert) and just send a click to clear this prompt?

Screenshot Of Login Screen
Is there any way get screenshot of login screen?

How To: Make A Login Screen
Ok.
This is how it is.
I'm not such of a expert on VB so please forgive me if this is a noob question:

I've already got some Forms wich get their data from a Access Dbase.

I want to make a program wich starts with a login screen that gets the loginname and password from the Access Dbase.

Does somebody know how tot start the program with the login screen and what the code is for the login screen to get the data out of the access Dbase?

Thnx very much in advance.

I Need Help With Building A Login Screen
Hello,

I'm trying to create a login screen for my aplication. I'm working with Visual Basic 6 and Access 97. I want to control access to each of the two areas of my aplication through a usergroup and user name/password check. I have two text boxes (user name and password) and a set of option boxes to select which area the user wants to log into. I have an Access database with three columns user/pass/group. If the user is classified in the manager user group then (s)he should be allowed to log into both areas but if classified into the employee user group only one. What I need help with is how would I search the Access database to check for a valid user name/password and then check for the usergroup the user belongs to? Any help would be apriciated. Thanks!

-123

Windows Login Screen
How do you make your VB app be used as a windows logon screen - instead of the boring windows one, your own vb app???

Please help!!!

Login Screen Like In Linux And NT
This is what I'm trying to do. I want my program to load up at start up before Windows even load up, and stop Windows from loading until a password is entered..

Any clues?

Win 9x Login Screen Hwnd
Does anyone know what the login prompt for Win 9x's hwnd is?

Login Screen And Passwords
Hi,
I created a database using access and VB.
My problem now is to create a login screen with passwords. I have done the login screen but do not know how to create user accounts with passwords for validation. Can someone help?

your help would be much appreciated.

Regards,

Jeias

Login Screen-BOF Or EOF Error
I have a login screen that looks for a username and password from an access database. When the username and password are both correct then I get a successful login. When username is correct and password is wrong then I get an error for Invalid Username/Password. But when a Username is not in the access database I get the error "Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record."

Please help.

Code:Private Sub cmdOK_Click()
Private Sub cmdOK_Click()
Dim strsql As String

If Trim(txtUserName.Text) = "" Or Trim(txtPassword.Text) = "" Then
    MsgBox "Please enter username/password"
    Exit Sub
End If

strsql = "select * from users where userid=" & "'" & Trim(txtUserName.Text) & "'"
Screen.MousePointer = vbHourglass
Call connect(strsql)


    If rst!password = txtPassword Then
        access = Trim(rst!Group)
        Call disconnect
        Unload Me
        Load frmmain
        frmmain.Show
        Call frmmain.SetFrmMenu
        Screen.MousePointer = vbNormal
        Exit Sub
        End If
      
    
    If rst!password <> txtPassword Then
    access = "denied"
    MsgBox "Invalid login name or password"
    Call connect("select * from logs")
    
    rst.AddNew
    rst!ldate = Date
    rst!ltime = Time
    rst!userid = Left(txtUserName.Text, 10)
    rst!password = Left(txtPassword.Text, 10)
    rst!Status = access
    rst.Update
    Screen.MousePointer = vbNormal

Call disconnect
End If
End Sub



Edited by - smasino25 on 12/15/2004 1:53:00 PM

Coding A Login Screen Using A DB
I am trying to code a login in screen that opens a database, checks if the username and password are located in the database, and if it is allows access to the next form if not displays a message box and returns to the login form. I have the code bellow the only problem is if the user name and password are not the 1 or second record, the program freezes what am I doing wrong, keep in mind that in the forms to follow I am going to be using forms to add new users, delete users and change passwords.

My Code:

Private Sub cmdLogin_Click()
Const conBtns As Integer = vbOK + vbExclamation + vbDefaultButton1 + vbApplicationModal
Dim intUserResponse As Integer
Dim intIndex As Integer
GoTo 150
100:
If frmAdmin.adoAdmin.Recordset.EOF = True Then
GoTo 300
Else
If txtUsername.Text = frmAdmin.adoAdmin.Recordset.Fields("fldName") Then
GoTo 250
Else
GoTo 150
150:
frmAdmin.adoAdmin.Recordset.MoveFirst
If txtUsername.Text <> frmAdmin.adoAdmin.Recordset.Fields("fldName") Then
frmAdmin.adoAdmin.Recordset.MoveNext
GoTo 100
Else
GoTo 100
200:
If frmAdmin.adoAdmin.Recordset.EOF = True Then
GoTo 300
Else
If txtPassword.Text = frmAdmin.adoAdmin.Recordset.Fields("fldPass") Then
GoTo 400
Else
GoTo 250
250:
If txtPassword.Text <> frmAdmin.adoAdmin.Recordset.Fields("fldPass") Then
GoTo 200
Else
GoTo 400
400:
frmAdmin.Hide
frmMain.Show
GoTo 500
End If
End If
End If
End If
End If
End If
300:
intUserResponse = MsgBox("Invalid Login Access Denied", conBtns, "Admin Systems")
500:

End Sub

Please help I have tried everything I know and am at a loss.

Changing The Visible Name At The XP Login Screen
Hey guys, I've got an application that changes the *real* value of the XP username, the one returned with GetUserName API, etc. But now I would also like to change the name shown at the login screen at the same time within the application.

Any suggestions on how to do this?

SetWindowPos And Login Screen Problem
Hi,

I have this application that I want to make "always on top" by using the SetWindowPos API function. It has a login screen which itself must always be on top of the main application window. When I apply SetWindowPos on Form_Load of the main window, the main window becomes topmost as I intended it to be. Then I call frmLogin.Show vbModal, Me. Unfortunately, the login screen is displayed behind the main window. The main window won't respond until I interact and get rid of the login screen, which is behind the main window. I can't move the main window because of the login screen shown as modal.

Is there a way for me to have the main application always on top first, then have the login window shown on top of that, with both windows on top of all applications? The idea is something like what Yahoo Messenger does: when the main application is set to always on top and you login, both the main YM window and the login screen are on top of everything else, but the login screen is always on top of the YM window.

I'm thinking that I have to make the login screen be a child window of the the main app, but I have no idea how to do this, and applying SetWindowPos at the same time. I'd really appreciate any help you can throw my way.

Thanks a bunch!

Windows Login Screen Font
Does anyone know what font and what password character is used on the windows login screen



edit: im also looking for the font that is used for the username field

Webbrowser Control And Pop-up Login Screen....
Does anyone know if you can intercept the "Connect to....." popup screen that pops up when going to some pages.

I have the username and password that is needed for the log in, but can even seem to get a simple sendkeys to work....

Get Username And Password From Php -login Screen
Hi,

I've been looking around and couldnt find anything about it. I need vb to connect to .php on some site and connect and see if username and password is correct, and I will be able to add and delete user's on some php file on the internet. If you know where any coding like this, could you please tell me as that would be very helpful

thanks

WinXP Pro Login/Logoff Screen
Hey all, this isn;t VB related but I've searched all over the net and can't find an answer to this.

In WinXP you have a welcome screen that has users with their logos. You click on a logo and it takes you to Windows with your profile.

When you log off you have a window popup that has 3 buttons. Hibernate/Restart/Shutdown.

Well, I've done something and now I have the old style log in and log off windows. When I go to log off for instance I have a little window popup with a drop down that has Shutdown/Restart/etc.. in it.


Anyone know how I change it back to the regualr XP style login/logoff?


Thanks!

Fake Login Screen... And What Else Are People Coding In VB...
Hey, I just finished my fake login app for british RM Connect networks. You can learn more about it and download the source from my site (http://homepages.hack-net.com/news/theoutpost). I was wondering if anyone else is working on any projects like this...

Laterz

REM

Help! Everytime Windows Starts, The Login Screen Shows (win98 FE).. How Do I ...
Help! Everytime windows starts, the login screen shows (win98 FE).. how do i get rid of this? Anyone know?

Create Login Problem !
i got 3 type username and password :
1. boss
2. manager
3. staff

how should i check if the username is exist then pop up msgbox error else add username and password to database


Code:
Dim rss As New ADODB.Recordset
Dim strID As String
Dim cnn As New ADODB.Connection
Dim strCNString As String
Dim intFound As Integer

strCNString = "Data Source=" & App.Path & "PayrollBakeryDB.mdb"
cnn.Provider = "Microsoft Jet 4.0 OLE DB Provider"
cnn.ConnectionString = strCNString
cnn.Open

If txtPassword.Text <> txtC_Password.Text Then
MsgBox "Password must be same with confirm pasword ! ", vbExclamation, "Error"
Else
With rss
.Open "SELECT emp_id, s_username,s_password, m_username,m_password, b_username,b_password FROM Employees", cnn, adOpenDynamic, adLockOptimistic
Do Until .EOF
If txtSearch.Text = !emp_id Then
If txtUserName.Text = !s_username Then
intFounds = 2
MsgBox "UserName aleardy use by other staff !!", vbExclamation, "Create Account"
Else
If txtType.Text = "boss" Then
!b_username = txtUserName.Text
!b_password = txtPassword.Text
.Update
MsgBox "Create Succeeded!!", vbExclamation, "Create Account"
txtSearch.Text = ""
txtName.Text = ""
txtType.Text = ""
txtUserName.Text = ""
txtPassword.Text = ""
txtC_Password.Text = ""
intFounds = 1

ElseIf txtType.Text = "manager" Then
!m_username = txtUserName.Text
!m_password = txtPassword.Text
.Update
MsgBox "Create Succeeded!!", vbExclamation, "Create Account"
txtSearch.Text = ""
txtName.Text = ""
txtType.Text = ""
txtUserName.Text = ""
txtPassword.Text = ""
txtC_Password.Text = ""
intFounds = 1

ElseIf txtType.Text = "staff" Then
!s_username = txtUserName.Text
!s_password = txtPassword.Text
.Update
MsgBox "Create Succeeded!!", vbExclamation, "Create Account"
txtSearch.Text = ""
txtName.Text = ""
txtType.Text = ""
txtUserName.Text = ""
txtPassword.Text = ""
txtC_Password.Text = ""
intFounds = 1

End If
End If

End If
.MoveNext
Loop
.MoveFirst
If intFounds = 0 Then
MsgBox "Employee ID not found !", vbExclamation, "Search"
ElseIf intFounds = 2 Then
MsgBox "Please change username and try againt !", vbExclamation, "Error"
txtUserName.Text = ""
txtPassword.Text = ""
txtC_Password.Text = ""
End If

End With
Exit Sub

cnn.Close
End If
cnn.Close

How To Create A Login Form
hi all,
i need a login form that connects to a database. Let's say A:ug.mdb.
There would be a limit of three times for the user to try.
I already had two text boxes:-
1) User name
2)Password
I do not know how to link and verify with the database.
Please help out. TQ.

How To Create Login Using VB With MSaccess
I need ur help to create a login form created using VB and should accept the username and password which is present in the MSaccess.

Login And Create Session With VB6
I am trying to get connected to a website from VB6, I wnat to be able to login and create
session in order to post data to the site at later stage.

I do not have any idea where to start, any advice will be appreciated and if there is an existing code that i can modify to do this will be even better. Thanks for your help.

Amjad

Create Login W/out Using Database?
Just a simple question from a newbie...

How can you create a login form for your application w/out using a database? I don't know how to use (or what's the use) of the Registry. What are the advantages of programming the Registry anyway?

As to the login, the user should be able to change his/her username and password anytime. What's the best way to do this?

I really need help on this.

Thanks a lot!!!

Need Help: How To Create A VB / Configuration File That Will Automate Login To A Web
Hi All
I need some suggestions / Help. Any input will be very much appreciated.

Scenario:
1. I have a Joomla CMS website and It is password protected. It is a support website
2. I have an exe (VB6 Program). lets say it is Accounting.EXE
3. And I have clients / Customer

The Support website is to provide support for the accounting.exe software

What I would like to do is to restrict public to be able to view the support website and let all my customer / clients that have accounting.exe installed in their computer to be able to view the support website without needing to enter a username and password when they need support.

Please Advise, what are the possible solution for this scenario. and how difficult is it to implement

I have asked in Joomla website and PHP website, and they recommend me to ask in VB forum...

The recommendation I got from PHP forum, is to have cookie setup. I can't use cookie because, once the cookie is deleted, user will need to enter their username and password again.

any help is appreciated ..

Thank you.

What I was thinking if it is possible to have VB / any kind of script file that will fetch in the username and password. And somehow automate the login.

*RESOLVED* Create A NEW Password In The Login Form?
I attempting to write code within the Login form that will check the Managers table and see if they have the generic password "12345", if so then I want to ask the Manager to enter their New password...this new password would be placed over the exsisting "12345"

I would then close the program, and ask that they restart the program, at which they will use their New password!

This is what I have so far:


VB Code:
Option ExplicitDim CN As ADODB.ConnectionDim rst As ADODB.RecordsetDim sSql As String Public OK As Boolean Private Sub OpenDBCon()    Set CN = New ADODB.Connection    CN.Provider = "Microsoft.Jet.OLEDB.4.0"    CN.Open "C:PprPPR.mdb"End Sub Private Sub CloseDBConn()    If Not CN Is Nothing Then            If CN.State <> adStateClosed Then            CN.Close        End If                Set CN = Nothing            End IfEnd Sub Private Sub CloseRS()On Error GoTo EH1:     If Not rst Is Nothing Then            If rst.State <> adStateClosed Then            rst.Close        End If                Set rst = Nothing            End If    EH1:    Resume NextEnd Sub Private Sub cmdCancel_Click()    'set the command OK to false        cmdOK = False    Unload MeEnd Sub Private Sub cmdOK_Click()OpenDBCon  ' open database connectionsSql = "SELECT * FROM tblMgr WHERE LID ='" & txtLoginID.Text & "' AND Password = '" & txtPassword.Text & "'"Set rst = New ADODB.Recordset rst.Open sSql, CN, adOpenDynamic, adLockOptimistic   If rst("Password") = "12345" Then'The modUserData is a module that holds a Global vaiable called Password    modUserData.Password = InputBox("Please enter your new (5) character password!", "New Password")    FillPasswordElseIf rst.EOF Then   'check if the user's LID is valid    MsgBox "User not found!", vbInformation, "Login Error"    Unload Me    frmLogin.ShowElse    modUserData.MgrName = rst("MGRName")    modUserData.DeptName = rst("DeptName")    frmSplash.Show    Unload Me    rst.CloseEnd If End Sub Private Sub FillPassword() rst("Password") = modUserData.Password MsgBox "The program will close now." & vbCrLf & _            "Please restart the program and use your new password!", vbInformation, "Thank You!" CloseRS Unload Me End Sub

The problem I am running into is that it is not changing the password in the underlying table!

I will keep working on this, but if anyone has done this and would like to share their knowledge...I am listening

Thanks!

How To Create An Apresentation Screen?
Hello everybody, my question is (I guess) simple:

I wanna increase the look of my database interface so.

Do you know that apresentation screen that appears always when we start a program?
Like the Internet Explorer, before enter in the program strickly speaking.

How I can create that? How control the time of that frame?

Very thanks.

God Bless you all.

Viva Freedom!

How To Create A Screen Saver With VB
Anyone have any idea on how to create a screen saver with VB? Is it possible in the first place?

How To Create A Splash Screen
hi!,

how do u create a splash screen.

Anyways plz let me know as soon as possible.

Thank you for ur help in this matter.

Create Exe From What Is Happening On Screen
Hi:

How do I create an EXE about what's happenning in the screen. I used the MsCam.exe from Office 97 but there's a problem; if I use a PictureBox in a VB6 aplication it looks like an object without picture. Is there some free software for that? or at least a trial version to prove it and decide to buy it.

Julio Cesar

How To Create Hotkey For Screen Saver
I have create a v.b 6.0 program for screen saver now I want to add a hotkey to my screen saver so that I can start my screen saver when I will hit a combination of keys.
please suggest me a way to create this hotkey.

How To Create Touch Screen Application Using VB6
Hi,
I am working in VB6. I want to create touch screen application using vb6. I don't know how to create touch screen event in vb6.
Anyone knows kindly help me. Send me some example codes also.
Thanks in Advance
Vijaya

How Do I Create Screen Saver For Windows XP
I created a screen saver in VB. It works in Windows 98 but not XP. I put it in folder Windows/System32 and set the extension to .scr. It shows up in CControl Panel/Display/Screensaver/screensacer drop down list. But it comes on on,ly as a blank form over, or near, the task bar.

Thanks for any help.

Copyright 2005-08 www.BigResource.com, All rights reserved