0% found this document useful (0 votes)
6 views9 pages

UI Design and Coding for Login System

The document contains code for designing login, new user, and control panel user interfaces. The login form code checks for a correct password and sets a global variable to indicate login success. The new user form code validates user data entry and adds a new record to a database table. The control panel code contains event handlers that open different forms for reservation, inquiry, payment, cancellation, and exit functions.

Uploaded by

Ankit Pandey
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views9 pages

UI Design and Coding for Login System

The document contains code for designing login, new user, and control panel user interfaces. The login form code checks for a correct password and sets a global variable to indicate login success. The new user form code validates user data entry and adds a new record to a database table. The control panel code contains event handlers that open different forms for reservation, inquiry, payment, cancellation, and exit functions.

Uploaded by

Ankit Pandey
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

UI DESIGN & CODING

Name:

Class:
Date of performance:
Date of submission:
Grade:
Sign:
Login Form

coding
Option Explicit

Public LoginSucceeded As Boolean

Private Sub cmdCancel_Click()

'set the global var to false to denote a failed login

End

End Sub
Private Sub cmdOK_Click()

'check for correct password

If txtPassword = "password" Then

'place code to here to pass the

'success to the calling sub

'setting a global var is the easiest

LoginSucceeded = True

MsgBox “Login [Link]”

[Link]

Else

MsgBox "Invalid Password, try again!", , "Login"

[Link]

SendKeys "{Home}+{End}"

End If

End Sub
New user form

Coding

Option Explicit

Dim flagvalidate As Boolean

Dim cnUsers As [Link]

Dim rsUsers As [Link]

Private Sub cmdCancel_Click()

End

End Sub

Private Sub cmdCreateUser_Click()

On Error Resume Next

Call validate_data
If flagvalidate Then

[Link]

rsUsers!UserName = [Link]

rsUsers!Password = [Link]

rsAlternateEmail!Type = [Link]

[Link]

[Link]

MsgBox "Account Created [Link]"

End If

End Sub

Private Sub Form_Load()

flagvalidate = False

Set cnUsers = New [Link]

Set rsUsers = New [Link]

[Link] "Provider=[Link].4.0;Data Source=D:\OOSE\Coding\[Link];Persist


Security Info=False"

[Link] "Select * from Users", cnUsers, adOpenDynamic, adLockPessimistic

End Sub

Public Sub validate_data()

flagvalidate = True

If ([Link] = "") Or ([Link] = "") Or ([Link] = "") Then

flagvalidate = False

MsgBox "Some Fields are blank. Please Enter the Data"

Exit Sub

End If

If [Link] <> [Link] Then


flagvalidate = False

MsgBox "The two passwords must be same. Please type them again"

[Link] = [Link] = ""

[Link]

Exit Sub

End If

End Sub
Control panel –user interface

Coding

Option Explicit

Dim flagvalidate As Boolean

Dim cnUsers As [Link]

Dim rsUsers As [Link]

Private Sub cmdReservation_Click()

[Link]
End Sub

Private Subcmd Inquiry_Click()

[Link]

End Sub

Private Sub cmdPayement_Click()

[Link]

End Sub

Private Sub cmdCancellation_Click()

[Link]

End Sub

Private Sub cmdPrintTicket_Click()

[Link]

End Sub

Private Sub cmdExit_Click()

[Link]

End Sub

Private Sub Form_Load()

flagvalidate = False

Set cnUsers = New [Link]


Set rsUsers = New [Link]

[Link] "Provider=[Link].4.0;Data Source=D:\OOSE\Coding\[Link];Persist


Security Info=False"

[Link] "Select * from Users", cnUsers, adOpenDynamic, adLockPessimistic

End Sub

You might also like