Private Sub Command2_Click() End End Sub. Private Sub Command3_Click() frmchangepassword.show End Sub. Private Sub Form_Activate() check_db End Sub

Similar documents
LISTING PROGRAM. 1. Form Login. Private Sub BATAL_Click() End End Sub

ต วอย างการสร างฟอร ม เมน การใช งาน

LAMPIRAN FORM 1 Universitas Sumatera Universitas Utara

IS 320 Spring 96 Page 1 Exam 1. Please use your own paper to answer the following questions. Point values are shown in parentheses.

Function: function procedures and sub procedures share the same characteristics, with

LAMPIRAN. Universitas Sumatera Utara

PROGRAM 1: SIMPLE CALCULATOR


Tutorial, Source code, Request Program Visual Basic

LAMPIRAN A LISTING PROGRAM. Universitas Sumatera Utara

Create a Login System in Visual Basic. Creating a login system. Start a new visual basic Windows Forms application project. Call it Login System

LAMPIRAN LIST PROGRAM

Frequently Asked Questions: Online Assessments

File Organization and Management

Remainder Cordial Labeling of Graphs

LISTING PROGRAM. Form Splash

STEP 1: CREATING THE DATABASE

FRAMEWORK CODE: On Error Resume Next Dim objapp As Object Dim ObjSEEC As Object

AIM To analyze, design and develop code for Online Course Reservation System using Rational Rose software

The Control Properties

The design and implementation of UML-based students information management system

NATIONAL DIPLOMA IN COMPUTER TECHNOLOGY

Errors, Warnings, and Issues WARNING #2077

Financial Functions (all with subtypes: Normal, Stairs, Points, Height, Hollow, Colors, Marks, No Border except where indicated):

Angel International School - Manipay 1 st Term Examination November, 2015

Relational Operators. > greater than < less than >= greater than or equal to <= less than or equal to <> not equal to = equal to

Level 2 Creating an event driven computer program using Visual Basic ( )

An Introduction to Custom WebBrowsers for the Qualitative Study of Hypertext Navigation

Visual Basic 6 Lecture 7. The List Box:

Programming with visual Basic:

2-26 Learn Visual Basic 6.0

CS130/230 Lecture 12 Advanced Forms and Visual Basic for Applications

CMPT 110 MIDTERM OCTOBER 18, 2001

An InputBox( ) function will display an input Box window where the user can enter a value or a text. The format is

New Password Reset for Dental Connect Provider

Angel International School - Manipay 1 st Term Examination November, 2015

User Manual Appointment System

Password Protect an Access Database

IP Network Camera J2ME (Java) Application

2Practicals Visual Basic 6.0

Chapter 2.4: Common facilities of procedural languages

On Railway Reservation. U G D C A Semester VI. Roll No DA

Microsoft Access 2010 Level III

Firelands FCU Fireline Online Banking Enrollment Steps

Lawrence Shepperd Candidate number: 9128 Centre Number: 26202

Example File Manipulation in Visual Basic

Please answer questions in the space provided. Question point values are shown in parentheses.

HELP - VB TIPS. ANIMATE AN IMAGE BOX Insert a module. In this module, create a global variable: Global x

Allow local or remote applications to access the functionality in the VisualCron server through an easy to use interface.

GOQUO AGENT PORTAL USER GUIDE

Visual Basic

MAILING SERVICES ORDER SYSTEM Security Login User Manual

Tech-Talk Using the PATROL Agent COM Server August 1999 Authored By: Eric Anderson

Horizon Bullhorn Add-in User Guide v1.0

2. Click on the "FREE JAVA DOWNLOAD" button. Note: It will check their PC first and tell them if they have the latest version of Java.

This project was originally conceived as a pocket database application for a mobile platform, allowing a

SQL INJECTION IN WEB APPLICATIONS By Roshmi Choudhury,Officer (IT) Numaligarh Refinery Limited

STRING Represents group of characters Each character 1 byte CIE, AB304 BOOLEAN Logical Datatype, return true or False Memory Required 1

To start, go type in icatcard.ucmerced.edu in the the Address Bar and press enter to go the icatcard System.

Addin Guide Microsoft Dynamics CRM

UNIT 1 INTRODUCTION TO VISUAL BASICS 6.0

NE1R EAST UNIVERSITY, FA-CULTYOF ENGINEERING DEPARTMENT OF COMPUTER ENGINEERING COM400 GRADUATION PROJECT LIBRARY AND BOOKSTORE AND DATABASE

Universitas Sumatera Utara

CRM Integration. SalesForce 06/01/2016

Visual Basic. The Integrated Development Environment. Menu Bar

Horizon Integrator CRM. EMIS Add-in Guide

Crystal Reports. Overview. Contents. Using Crystal Reports Print Engine calls (API) in Microsoft Visual Basic

To write a query with a functions of DDL commands such as create, alter, drop.

Horizon Integrator CRM. Bullhorn Add-in Guide

NOTES: Procedures (module 15)

VISUAL BASIC REVISION TOUR AND CONTROL STRUCTURE

PG-MSR207 manual swipe magnetic card Reader/Writer User s Guide

Computer Science 330 Assignment

WEB PROGRAMMING SCV1223. PHP : Authentication Example. Dr. Md Sah bin Hj Salam En. Jumail bin Taliba

S.2 Computer Literacy Question-Answer Book

3. Can every Do-Loop loop be written as a For-Next loop? Why or why not? 4. Name two types of files that can be opened and used in a VB program.

accounts in Administration.docx

Connecting VirtueMart To PayPal (Live)

Webmail Instructions

Using CSE Cisco Anyconnect with 2FA

Download the files from you will use these files to finish the following exercises.

ElseIf: Another Conditional Statement

Albridge Integration User Guide

Figure 1 - The password is 'Smith'

PROJECT ELECTRONIC CONTROL GAS INJECTION SYSTEM

User Guide. The Bluffs Ocean South website Page 1. November, 2015

Catalyst Development Corporation An Introduction to TCP/IP Programming With SocketWrench

IT3101 -Rapid Application Development Second Year- First Semester. Practical 01. Visual Basic.NET Environment.

Fast Food Store Group Boxes and Other User Controls

Internet Society Association Management System 2009 Chapter Portal. Member Portal Guide

Network Online Services How to Register Guide

The following steps guide you through logging in to the Virtual Gateway:

EMPLOYEE PAYROLL SYSTEM

7 The system should allow administrator to close a user profile. 8 The system shall make the old events invisible to avoid crowded geo scope.

Propose a mathematical formula to verify the authenticity of any product of the integers using a scale (9) and verified using computer

Imports System.Data.SqlClient. Public Class Phonebook

MenuStrip Control. The MenuStrip control represents the container for the menu structure.

Creating Your Parent Account

Control Properties. Example: Program to change background color

Prerequisites Before working on this exercise, you should be familiar with the following:

Transcription:

Private Sub Command1_Click() On Error Resume If rs.state = adstateopen Then rs.close rs.open "select * from login where UserName='" & txtusername & "' And Log_Password='" & txtpassword & "'", conn, 1, 2 rec_count = rs.recordcount If rec_count = 0 Then MsgBox "Invalid User Name Or Password" txtpassword.setfocus SendKeys "{Home}+{End}" Else If Check1.Value = 1 Then strq = "update login set flag='1' where UserName='" & txtusername & "' And Log_Password='" & txtpassword & "'" MDIForm1.Show Private Sub Command2_Click() End Private Sub Command3_Click() frmchangepassword.show Private Sub Form_Activate() check_db Private Sub check_db()

If rs.state = adstateopen Then rs.close strq = "select * from login where flag='1'" If rs.recordcount = 0 Then Else txtusername = rs(0) txtpassword = rs(1) Check1.Value = 1 strq = "update login set flag='0' where flag='1'" Private Sub txtpassword_keypress(keyascii As Integer) Command1_Click Private Sub txtusername_keypress(keyascii As Integer) Command1_Click Book Issue Form Private Sub Command1_Click() If Trim(Text1) = "" Then MsgBox "Please Enter Member No." Text1.SetFocus If Trim(Text2) = "" Then MsgBox "Please Enter Member No." Text2.SetFocus

strq = "insert into issue values('" & Create_ID & "','" & Text1 & "','" & Text2 & "','" & _ IssueDate & "','" & ReturnDate & "','" & "I" & "')" strq = "Update BookMaster set status='i' where bookno=" & Text1 & "" strq = "Update MemberMaster set status='b' where memno=" & Text2 & "" Private Function Create_ID() As String strq = "select max(id) from issue" If rs.state = adstateopen Then rs.close If IsNull(rs(0)) = True Then Create_ID = "1" Else Create_ID = Trim(Str(rs(0) + 1)) End Function Private Sub clear_textbox() Dim ctl As Control For Each ctl In Controls If TypeOf ctl Is TextBox Then ctl.text = "" For Each ctl In Controls If TypeOf ctl Is MaskEdBox Then ctl.mask = "" ctl.text = "" ctl.mask = "##/##/####"

Private Sub Command2_Click() Private Sub Form_Activate() clear_textbox Private Sub Form_Load() Me.Top = 1545 Me.Left = 2640 Private Sub IssueDate_GotFocus() IssueDate = Format(Date, "MM/DD/YYYY") Private Sub IssueDate_KeyPress(KeyAscii As Integer) Private Sub MaskEdBox1_KeyPress(KeyAscii As Integer) Private Sub ReturnDate_GotFocus() If IsDate(IssueDate) = False Then dd = DateAdd("d", 7, IssueDate) ReturnDate = Format(dd, "MM/DD/YYYY") Private Sub Text1_KeyPress(KeyAscii As Integer)

Private Sub Text1_LostFocus() If Trim(Text1) <> "" Then strq = "select * from membermaster where memno=" & Text1 & "" If rs.state = adstateopen Then rs.close If rs.recordcount = 0 Then MsgBox "Member not Found" Text1 = "" Text1.SetFocus If rs(8) <> "P" Then MsgBox "This Member have already a book or meber is expired" Text1 = "" Text1.SetFocus lblname = rs(1) lbladdress = rs(2) lblmemno = rs(0) Private Sub Text2_KeyPress(KeyAscii As Integer) Private Sub Text2_LostFocus() If Trim(Text2) <> "" Then strq = "select * from bookmaster where bookno=" & Text2 & "" If rs.state = adstateopen Then rs.close

If rs.recordcount = 0 Then MsgBox "Member not Found" Text1 = "" Text1.SetFocus If rs(8) <> "P" Then MsgBox "This Book is not present this time" Text2.SetFocus lblcat = rs(1) lblbname = rs(2) lblauthor = rs(4) Issue Book View form Private Sub populategrid() Grid.ColWidth(0) = 0 Grid.ColWidth(1) = 2505 Grid.ColWidth(2) = 2625 Grid.ColWidth(3) = 2025 Grid.ColWidth(4) = 1845 Grid.TextMatrix(0, 1) = "Member No." Grid.TextMatrix(0, 2) = "Book No." Grid.TextMatrix(0, 3) = "Date of Issue" Grid.TextMatrix(0, 4) = "Date Of Return" If rs.state = adstateopen Then rs.close strq = "select * from Issue where status='i'" For i = 1 To rs.recordcount If Grid.TextMatrix(1, 0) <> "" Then Grid.TextMatrix(i, 8) = rs(8) Grid.Rows = Grid.Rows + 1 Grid.TextMatrix(i, 0) = rs(0)

Grid.TextMatrix(i, 1) = rs(1) Grid.TextMatrix(i, 2) = rs(2) Grid.TextMatrix(i, 3) = rs(3) Grid.TextMatrix(i, 4) = rs(4) rs.move Private Sub Command1_Click() Private Sub CmdClo_Click() Private Sub Form_Activate() populategrid Private Sub Form_Load() Me.Top = 1545 Me.Left = 2640 New Member Form Private Sub Command1_Click() strq = "insert into membermaster values('" & lblmemno & "','" & _ txtname & "','" & txtaddress & "','" & txttele1 & "','" & txttele2 & "','" & txtemail & "','" & DOJ & "','" & DOE & "','" & "P" & "')" Form_Activate Public Function MEMno() As String strq = "select max(memno) from membermaster"

If rs.state = adstateopen Then rs.close If IsNull(rs(0)) = True Then lblmemno = "100" Else lblmemno = Trim(Str(rs(0) + 1)) End Function Private Sub clear_textbox() Dim ctl As Control For Each ctl In Controls If TypeOf ctl Is TextBox Then ctl.text = "" For Each ctl In Controls If TypeOf ctl Is MaskEdBox Then ctl.mask = "" ctl.text = "" ctl.mask = "##/##/####" Private Sub Command3_Click() Private Sub Form_Activate() clear_textbox MEMno Private Sub Form_Load() Me.Top = 1545 Me.Left = 2640

Member View Form Private Sub populategrid() Grid.ColWidth(0) = 945 Grid.ColWidth(1) = 1875 Grid.ColWidth(2) = 2535 Grid.ColWidth(3) = 1100 Grid.ColWidth(4) = 1100 Grid.ColWidth(5) = 1300 Grid.ColWidth(6) = 945 Grid.ColWidth(7) = 945 Grid.ColWidth(8) = 600 Grid.TextMatrix(0, 0) = "Mem. No." Grid.TextMatrix(0, 1) = "Name" Grid.TextMatrix(0, 2) = "Address" Grid.TextMatrix(0, 3) = "Telephone1" Grid.TextMatrix(0, 4) = "Telephone2" Grid.TextMatrix(0, 5) = "Email" Grid.TextMatrix(0, 6) = "DOJ" Grid.TextMatrix(0, 7) = "DOE" Grid.TextMatrix(0, 8) = "Status" If rs.state = adstateopen Then rs.close strq = "select * from membermaster" For i = 1 To rs.recordcount If Grid.TextMatrix(1, 0) <> "" Then Grid.TextMatrix(i, 8) = rs(8) Grid.Rows = Grid.Rows + 1 Grid.TextMatrix(i, 0) = rs(0) Grid.TextMatrix(i, 1) = rs(1) Grid.TextMatrix(i, 2) = rs(2) Grid.TextMatrix(i, 3) = rs(3) Grid.TextMatrix(i, 4) = rs(4) Grid.TextMatrix(i, 5) = rs(5) Grid.TextMatrix(i, 6) = rs(6)

Grid.TextMatrix(i, 7) = rs(7) Grid.TextMatrix(i, 8) = rs(8) rs.move Private Sub Command1_Click() Private Sub Form_Activate() Me.Top = 0 Me.Left = 0 populategrid New Book Form Public Function Create_ID() As String strq = "select max(id) from bookmaster" If rs.state = adstateopen Then rs.close If IsNull(rs(0)) = True Then Create_ID = "1" Else Create_ID = Trim(Str(rs(0) + 1)) End Function Public Function Bookno() As String strq = "select max(bookno) from bookmaster" If rs.state = adstateopen Then rs.close If IsNull(rs(0)) = True Then lblbookno = "100"

Else lblbookno = Trim(Str(rs(0) + 1)) End Function Private Sub AuCombo_KeyPress(KeyAscii As Integer) Private Sub CatCombo_KeyPress(KeyAscii As Integer) Private Sub Command1_Click() strq = "insert into bookmaster values('" & Create_ID & "','" & _ CatCombo & "','" & txtbookname & "','" & lblbookno & "','" & AuCombo & "','" & txtprice & "','" & txtpage & "','" & Date & "','" & "P" & "')" Form_Activate Private Sub Command2_Click() Private Sub Form_Activate() clear_textbox Bookno popcombo populategrid Private Sub clear_textbox() Dim ctl As Control For Each ctl In Controls

If TypeOf ctl Is TextBox Then ctl.text = "" Private Sub popcombo() If rs.state = adstateopen Then rs.close strq = "select * from authormaster" For i = 1 To rs.recordcount AuCombo.AddItem rs(1) rs.move If rs.state = adstateopen Then rs.close strq = "select * from catmaster" For i = 1 To rs.recordcount CatCombo.AddItem rs(1) rs.move Private Sub populategrid() Grid.ColWidth(0) = 0 Grid.ColWidth(1) = 2260 Grid.ColWidth(2) = 2370 Grid.ColWidth(3) = 2355 Grid.ColWidth(4) = 1500 Grid.ColWidth(5) = 1500 Grid.ColWidth(6) = 1500 Grid.TextMatrix(0, 1) = "Category" Grid.TextMatrix(0, 2) = "Name Of Book" Grid.TextMatrix(0, 3) = "Author" Grid.TextMatrix(0, 4) = "Book No." Grid.TextMatrix(0, 5) = "Price" Grid.TextMatrix(0, 6) = "Date" Private Sub Grid_Click() MsgBox Grid.CellWidth

Private Sub txtbookname_keypress(keyascii As Integer) Private Sub txtpage_keypress(keyascii As Integer) Private Sub txtprice_keypress(keyascii As Integer) Book return Form Private Sub Command1_Click() If rs.state = adstateopen Then rs.close strq = "select * from issue where status='i' and bookno=" & Text1 & " and memno=" & Text2 & "" If rs.recordcount = 0 Then MsgBox "Invalid Entry" Text1.SetFocus strq = "Update issue set status='p' where bookno=" & Text1 & " and memno=" & Text2 & "" strq = "Update BookMaster set status='p' where bookno=" & Text1 & ""

strq = "Update MemberMaster set status='p' where memno=" & Text2 & "" Form_Activate Private Sub clear_textbox() Dim ctl As Control For Each ctl In Controls If TypeOf ctl Is TextBox Then ctl.text = "" Private Sub Command2_Click() Private Sub Form_Activate() clear_textbox Private Sub Form_Load() Me.Top = 1545 Me.Left = 2640 Private Sub Text1_KeyPress(KeyAscii As Integer) Private Sub Text2_KeyPress(KeyAscii As Integer)