Sunteți pe pagina 1din 41

APPENDICES

RELEVANT SOURCE CODE

DELETE

Option Explicit

Dim confirm

Private Sub Adodc1_WillMove(ByVal adReason As


ADODB.EventReasonEnum, adStatus As ADODB.EventStatusEnum, ByVal
pRecordset As ADODB.Recordset)

Adodc1.Caption = Adodc1.Recordset.RecordCount

End Sub

Private Sub Adodc2_WillMove(ByVal adReason As


ADODB.EventReasonEnum, adStatus As ADODB.EventStatusEnum, ByVal
pRecordset As ADODB.Recordset)

Adodc1.Caption = Adodc1.Recordset.RecordCount

End Sub

Private Sub Command1_Click()

DataGrid1.Enabled = True

End Sub

Private Sub Command2_Click()

If Text1.Text <> "" Then

Adodc1.RecordSource = "select * from vehicle where PlateNo LIKE '" &


Text1.Text & "%'"
End If

Adodc1.Refresh

Adodc1.Refresh

Command1.Visible = True

Command2.Visible = True

Command3.Visible = True

Command4.Visible = True

Command5.Visible = True

Command6.Visible = True

Adodc1.Visible = True

DataGrid1.Visible = True

DataGrid1.Enabled = False

End Sub

Private Sub Command3_Click()

'On Error Resume Next

CR03.Show vbModal

End Sub

Private Sub Command4_Click()

Unload Me

End Sub

Private Sub Command5_Click()

confirm = MsgBox("Are you sure you want to delete this record!", vbYesNo,
"Information")

If confirm = vbYes Then


Adodc1.Recordset.Delete

Adodc1.Recordset.MoveNext

MsgBox "Record Succussfullu Deleted", vbOK, "Information"

Else

MsgBox "Record Not Deleted", vbInformation, "Information"

Exit Sub

End If

End Sub

Private Sub Command6_Click()

Adodc1.Recordset.Update

MsgBox "Record Successfully Updated"

Adodc1.Refresh

End Sub

Private Sub Form_Load()

Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="


& App.Path & "\pnp.mdb;Persist Security Info = false"

Adodc1.RecordSource = "select * from vehicle"

Adodc1.Refresh

End Sub

Option Explicit

Dim confirm

Private Sub Adodc1_WillMove(ByVal adReason As


ADODB.EventReasonEnum, adStatus As ADODB.EventStatusEnum, ByVal
pRecordset As ADODB.Recordset)

Adodc1.Caption = Adodc1.Recordset.RecordCount
End Sub

Private Sub Adodc2_WillMove(ByVal adReason As


ADODB.EventReasonEnum, adStatus As ADODB.EventStatusEnum, ByVal
pRecordset As ADODB.Recordset)

Adodc1.Caption = Adodc1.Recordset.RecordCount

End Sub

Private Sub Command1_Click()

DataGrid1.Enabled = True

End Sub

Private Sub Command2_Click()

If Text1.Text <> "" Then

Adodc1.RecordSource = "select * from vehicle where PlateNo LIKE '" &


Text1.Text & "%'"

End If

Adodc1.Refresh

Adodc1.Refresh

Command1.Visible = True

Command2.Visible = True

Command3.Visible = True

Command4.Visible = True

Command5.Visible = True

Command6.Visible = True

Adodc1.Visible = True

DataGrid1.Visible = True

DataGrid1.Enabled = False
End Sub

Private Sub Command3_Click()

'On Error Resume Next

CR03.Show vbModal

End Sub

EDIT

Private Sub Command4_Click()

Unload Me

End Sub

Private Sub Command5_Click()

confirm = MsgBox("Are you sure you want to delete this record!", vbYesNo,
"Information")

If confirm = vbYes Then

Adodc1.Recordset.Delete

Adodc1.Recordset.MoveNext

MsgBox "Record Succussfullu Deleted", vbOK, "Information"

Else

MsgBox "Record Not Deleted", vbInformation, "Information"

Exit Sub

End If
End Sub

Private Sub Command6_Click()

Adodc1.Recordset.Update

MsgBox "Record Successfully Updated"

Adodc1.Refresh

End Sub

Private Sub Form_Load()

Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="


& App.Path & "\pnp.mdb;Persist Security Info = false"

Adodc1.RecordSource = "select * from vehicle"

Adodc1.Refresh

End Sub

SAVE

Option Explicit

Dim confirm

Private Sub Adodc1_WillMove(ByVal adReason As


ADODB.EventReasonEnum, adStatus As ADODB.EventStatusEnum, ByVal
pRecordset As ADODB.Recordset)

Adodc1.Caption = Adodc1.Recordset.RecordCount

End Sub

Private Sub Adodc2_WillMove(ByVal adReason As


ADODB.EventReasonEnum, adStatus As ADODB.EventStatusEnum, ByVal
pRecordset As ADODB.Recordset)

Adodc1.Caption = Adodc1.Recordset.RecordCount

End Sub
Private Sub Command1_Click()

DataGrid1.Enabled = True

End Sub

Private Sub Command2_Click()

If Text1.Text <> "" Then

Adodc1.RecordSource = "select * from vehicle where PlateNo LIKE '" &


Text1.Text & "%'"

End If

Adodc1.Refresh

Adodc1.Refresh

Command1.Visible = True

Command2.Visible = True

Command3.Visible = True

Command4.Visible = True

Command5.Visible = True

Command6.Visible = True

Adodc1.Visible = True

DataGrid1.Visible = True

DataGrid1.Enabled = False

End Sub

Private Sub Command3_Click()

'On Error Resume Next

CR03.Show vbModal

End Sub
Private Sub Command4_Click()

Unload Me

End Sub

Private Sub Command5_Click()

confirm = MsgBox("Are you sure you want to delete this record!", vbYesNo,
"Information")

If confirm = vbYes Then

Adodc1.Recordset.Delete

Adodc1.Recordset.MoveNext

MsgBox "Record Succussfullu Deleted", vbOK, "Information"

Else

MsgBox "Record Not Deleted", vbInformation, "Information"

Exit Sub

End If

End Sub

Private Sub Command6_Click()

Adodc1.Recordset.Update

MsgBox "Record Successfully Updated"

Adodc1.Refresh

End Sub

Private Sub Form_Load()

Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="


& App.Path & "\pnp.mdb;Persist Security Info = false"
Adodc1.RecordSource = "select * from vehicle"

Adodc1.Refresh

End Sub

CLOSE

Option Explicit

Dim confirm

Private Sub Adodc1_WillMove(ByVal adReason As


ADODB.EventReasonEnum, adStatus As ADODB.EventStatusEnum, ByVal
pRecordset As ADODB.Recordset)

Adodc1.Caption = Adodc1.Recordset.RecordCount

End Sub

Private Sub Adodc2_WillMove(ByVal adReason As


ADODB.EventReasonEnum, adStatus As ADODB.EventStatusEnum, ByVal
pRecordset As ADODB.Recordset)

Adodc1.Caption = Adodc1.Recordset.RecordCount

End Sub

Private Sub Command1_Click()

DataGrid1.Enabled = True

End Sub

Private Sub Command2_Click()

If Text1.Text <> "" Then

Adodc1.RecordSource = "select * from vehicle where PlateNo LIKE '" &


Text1.Text & "%'"

End If

Adodc1.Refresh

Adodc1.Refresh
Command1.Visible = True

Command2.Visible = True

Command3.Visible = True

Command4.Visible = True

Command5.Visible = True

Command6.Visible = True

Adodc1.Visible = True

DataGrid1.Visible = True

DataGrid1.Enabled = False

End Sub

Private Sub Command3_Click()

'On Error Resume Next

CR03.Show vbModal

End Sub

Private Sub Command4_Click()

Unload Me

End Sub

Private Sub Command5_Click()

confirm = MsgBox("Are you sure you want to delete this record!", vbYesNo,
"Information")

If confirm = vbYes Then

Adodc1.Recordset.Delete

Adodc1.Recordset.MoveNext

MsgBox "Record Succussfullu Deleted", vbOK, "Information"


Else

MsgBox "Record Not Deleted", vbInformation, "Information"

Exit Sub

End If

End Sub

Private Sub Command6_Click()

Adodc1.Recordset.Update

MsgBox "Record Successfully Updated"

Adodc1.Refresh

End Sub

Private Sub Form_Load()

Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="


& App.Path & "\pnp.mdb;Persist Security Info = false"

Adodc1.RecordSource = "select * from vehicle"

Adodc1.Refresh

End Sub

PRINT

Option Explicit

Dim confirm

Private Sub Adodc1_WillMove(ByVal adReason As


ADODB.EventReasonEnum, adStatus As ADODB.EventStatusEnum, ByVal
pRecordset As ADODB.Recordset)

Adodc1.Caption = Adodc1.Recordset.RecordCount

End Sub
Private Sub Adodc2_WillMove(ByVal adReason As
ADODB.EventReasonEnum, adStatus As ADODB.EventStatusEnum, ByVal
pRecordset As ADODB.Recordset)

Adodc1.Caption = Adodc1.Recordset.RecordCount

End Sub

Private Sub Command1_Click()

DataGrid1.Enabled = True

End Sub

Private Sub Command2_Click()

If Text1.Text <> "" Then

Adodc1.RecordSource = "select * from vehicle where PlateNo LIKE '" &


Text1.Text & "%'"

End If

Adodc1.Refresh

Adodc1.Refresh

Command1.Visible = True

Command2.Visible = True

Command3.Visible = True

Command4.Visible = True

Command5.Visible = True

Command6.Visible = True

Adodc1.Visible = True

DataGrid1.Visible = True

DataGrid1.Enabled = False
End Sub

Private Sub Command3_Click()

'On Error Resume Next

CR03.Show vbModal

End Sub

Private Sub Command4_Click()

Unload Me

End Sub

Private Sub Command5_Click()

confirm = MsgBox("Are you sure you want to delete this record!", vbYesNo,
"Information")

If confirm = vbYes Then

Adodc1.Recordset.Delete

Adodc1.Recordset.MoveNext

MsgBox "Record Succussfullu Deleted", vbOK, "Information"

Else

MsgBox "Record Not Deleted", vbInformation, "Information"

Exit Sub

End If

End Sub

Private Sub Command6_Click()

Adodc1.Recordset.Update

MsgBox "Record Successfully Updated"

Adodc1.Refresh
End Sub

Private Sub Form_Load()

Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="


& App.Path & "\pnp.mdb;Persist Security Info = false"

Adodc1.RecordSource = "select * from vehicle"

Adodc1.Refresh

End Sub

ADD NEW

Private Sub Command1_Click()

Combo1.Text = ""

Combo2.Text = ""

Text4.Text = ""

Text5.Text = ""

Text6.Text = ""

Text7.Text = ""

Text8.Text = ""

Text10.Text = ""

End Sub
Private Sub Command2_Click()

Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="


& App.Path & "\pnp.mdb;Persist Security Info = false"

Adodc1.RecordSource = "select *from aircon"

Adodc1.Refresh

Adodc1.Recordset.AddNew

Adodc1.Recordset!total = Adodc1.Recordset.RecordCount

If Text8.Text <> "" Then

Adodc1.Recordset!SerialNo = Text8.Text

End If

If Text4.Text <> "" Then

Adodc1.Recordset!Kind = Text4.Text

End If

If Text5.Text <> "" Then

Adodc1.Recordset!Description = Text5.Text

End If

If Text6.Text <> "" Then

Adodc1.Recordset!QuantityUnits = Text6.Text

End If

If Text7.Text <> "" Then

Adodc1.Recordset!UnitValue = Text7.Text

End If

If Combo1.Text <> "" Then

Adodc1.Recordset!Status = Combo1.Text
End If

If Combo2.Text <> "" Then

Adodc1.Recordset!Source = Combo2.Text

End If

If Text10.Text <> "" Then

Adodc1.Recordset!Remarks = Text10.Text

End If

Adodc1.Recordset.Update

MsgBox "Data is succesfully recorded", vbInformation, "PNP Inventory System"

Adodc1.Refresh

End Sub

Private Sub Command3_Click()

Unload Me

End Sub

Private Sub Form_Load()

Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="


& App.Path & "\pnp.mdb;Persist Security Info = false"

Adodc1.RecordSource = "select *from aircon"

Adodc1.Refresh

End Sub
SEARCH

Option Explicit

Dim confirm

Private Sub Adodc1_WillMove(ByVal adReason As


ADODB.EventReasonEnum, adStatus As ADODB.EventStatusEnum, ByVal
pRecordset As ADODB.Recordset)

Adodc1.Caption = Adodc1.Recordset.RecordCount

End Sub

Private Sub Command1_Click()

DataGrid1.Enabled = True

End Sub

Private Sub Command2_Click()

Adodc1.Recordset.Update

MsgBox "Record Successfully Updated"

Adodc1.Refresh

End Sub

Private Sub Command3_Click()

frmCR01.Show vbModal

End Sub

Private Sub Command4_Click()

Unload Me

End Sub
Private Sub Command5_Click()

confirm = MsgBox("Are you sure you want to delete this record!", vbYesNo,
"Information")

If confirm = vbYes Then

Adodc1.Recordset.Delete

Adodc1.Recordset.MoveNext

MsgBox "Record Succussfully Deleted", vbOK, "Information"

Else

MsgBox "Record Not Deleted", vbInformation, "Information"

Exit Sub

End If

End Sub

Private Sub Command6_Click()

If Text9.Text <> "" Then

Adodc1.RecordSource = "select * from aircon where SerialNo LIKE '" &


Text9.Text & "%'"

End If

Adodc1.Refresh

Command1.Visible = True

Command2.Visible = True

Command3.Visible = True

Command4.Visible = True

Command5.Visible = True
Adodc1.Visible = True

DataGrid1.Visible = True

DataGrid1.Enabled = False

End Sub

Private Sub Form_Load()

Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="


& App.Path & "\pnp.mdb;Persist Security Info = false"

Adodc1.RecordSource = "select * from aircon"

Adodc1.Refresh

End Sub
User’s Manual/ Users Guide

How to load the Program

1. Turn on the computer by pressing the power button of the system unit.

2. Wait until the window is located, and then click the following in an orderly

manner.

3. To execute Midsayap PNP Supply Inventory System. On the desktop click

Midsayap PNP Supply Inventory System. A splash screen will appear the log-in

form.

How to Login

On the splash screen, log in form will appear. The program itself is password

protected to ensure the programs safety and protection. Only the authorized

person knows the password to protect the program from unauthorized person who

may alter the file record in it. If log in was succeed, the main menu will be shown.

The menu bar has 3 options. The file, Search and Help.

How to Add Data

1. On the main menu, click the file then the “Add new” and the files you want to

input data by dragging the mouse.

2. Click “save” to save data to database and to add other record.

3. Click “close” to exit.


How to edit file

1. On the main menu, click search and the files you want to edit.

2. Click “save” to save the edited data to the database and to edit other record.

3. Click “close” to exit.

How to delete file

1. On the main menu click “ search” and the files you want to delete

2. Click “save”

3. Click “close to exit.

How to Print Report

On the main menu, click “search” then select among the options listed which

you may want to print.

Options:

1. Inventory of furniture and fixture equipment- click print, otherwise

close to return to main menu.

2. Inventory of communication equipment- click print, otherwise close to

return to main menu.

3. Inventory of vehicle equipment- click print, otherwise close to return to

main menu.
4. Inventory of Firearms- click print, otherwise close to return to main

menu.

5. Inventory of ammunitions- click print, otherwise close to return to main

menu.

How to search

1.On the main menu, click “search”

2.Then select among the submenus you may want to search.

Submenus

Furniture and Fixture – Enter serial number of furniture and fixture you want

to search then press enters key.

Communication Equipment - Enter serial number of communication

equipment you want to search then press enters key.

Long/ Short Firearms - Enter serial number of firearms you want to search

then press enters key.

Ammunitions - Enter serial number of ammunitions you want to search then

press enters key.

Vehicle – enter serial number of vehicle you want to search.


Help- this section provides you the document that may help as you go over this

program. It includes the:

User’s Manual

About the Program – a brief description about the program


OK Button CANCEL Button

LOGIN INTERFACE

The program itself is password-protected the programs safety and

protection. Only the authorized person knows the password to protect the program

to unauthorized person who may delete and alter the files recorded in it. If the

login succeeds, the main menu will be showed. Command button OK will be

clicked after the password will be written to continue to continue to the next form.

When the CANCEL was click, it will quit the program.


FILE SEARCH HELP

MAIN MENU INTERFACE

After the login succeed this main menu will shown, which a parent

Multiple Document Interface (MDI) is. The Multiple Document Interface (MDI)

creates application that maintains multiple forms within a single container form.

Provided in the menu bar are the File, Search and Help.
ADD INTERFACE (Inventory of Furniture and Fixture Equipment)
Figure display the inventory of Furniture and Fixture Equipment the

interface, it allows the users to add one or more records.


ADD INTERFACE (Inventory of Communication Equipment)
Figure display the inventory of Communication Equipment the interface, it

allows the users to add one or more records.


ADD INTERFACE (Inventory of Vehicle Equipment)
Figure display the inventory of Vehicle Equipment the interface, it allows

the users to add one or more records.


ADD INTERFACE (Inventory of Firearms Equipment)

Figure display the inventory of Firearms Equipment the interface, it allows

the users to add one or more records.


ADD INTERFACE (Inventory of Ammunitions Equipment)

Display the inventory of Ammunitions Equipment the interface, it allows

the users to add one or more records.


SEARCH INTERFACE

Display the Search Menu. If the user click the drop down button the

submenus will appear and click submenus you want to search.


SEARCH INTERFACE OF FURNITURE AND FIXTURE
EQUIPMENT

Display the Furniture and Fixture Equipment on the Search Interface. The
user will enter the serial number of the item and click search and the list view will
appear with the data that is searched and you will see on the status bar if how
many records were found. This form contain of Delete command button which
you can delete data on the database, Edit command button which you can edit
data on the database , Save command button which you can save data edited ,
Close command button which you can quit/close interface, and Print command
button which you can print data.
SEARCH INTERFACE OF COMMUNICATION EQUIPMENT

Display the Communication Equipment on the Search Interface. The user


will enter the serial number of the item and click search and the list view will
appear with the data that is searched and you will see on the status bar if how
many records were found. This form contain of Delete command button which
you can delete data on the database, Edit command button which you can edit
data on the database , Save command button which you can save data edited ,
Close command button which you can quit/close interface, and Print command
button which you can print data.
SEARCH INTERFACE OF VEHICLE EQUIPMENT

Display the Vehicle Equipment on the Search Interface. The user will
enter the serial number of the item and click search and the list view will appear
with the data that is searched and you will see on the status bar if how many
records were found. This form contain of Delete command button which you can
delete data on the database, Edit command button which you can edit data on the
database , Save command button which you can save data edited , Close
command button which you can quit/close interface, and Print command button
which you can print data.
SEARCH INTERFACE OF FIREARMS ISSUED

Display the Firearms Issued on the Search Interface. The user will enter
the serial number of the item and click search and the list view will appear with
the data that is searched and you will see on the status bar if how many records
were found. This form contain of Delete command button which you can delete
data on the database, Edit command button which you can edit data on the
database , Save command button which you can save data edited , Close
command button which you can quit/close interface, and Print command button
which you can print data.
SEARCH INTERFACE OF AMMUNITIONS

Display the Ammunitions on the Search Interface. The user will enter the
serial number of the item and click search and the list view will appear with the
data that is searched and you will see on the status bar if how many records were
found. This form contain of Delete command button which you can delete data
on the database, Edit command button which you can edit data on the database ,
Save command button which you can save data edited , Close command button
which you can quit/close interface, and Print command button which you can
print data.
SAMPLE OUTPUT REPORT

 Inventory of Furniture and Fixture

 Inventory of Communication Equipment

 Inventory of Vehicle

 Inventory of Firearms Issued

 Inventory of Ammunitions

S-ar putea să vă placă și