Académique Documents
Professionnel Documents
Culture Documents
1 Background of the Study Inventory System Inventory is the total amount of goods and/or materials contained in a store or factory at any given time. Store owners need to know the precise number of items on their selves and storage areas in order to place orders or control losses. Factory managers need to know how many units of their products are available for customer orders. Stores need to order more items based on their current supplies and product needs. All of these businesses rely on an inventory count to provide answers.
Inventory System is a complete inexpensive system for management of sales, purchase and payments. This system will help you in creation invoices, sales orders, purchase orders, receiving list, payment receipt, product labels, and any kinds of the reports for monitoring your business. Inventory System allows controlling customer balances and vendor balances.
Point of Sales A point-of-sale display (POS) is a specialized form of sales promotion that is found near, on, or next to a checkout counter (the "point of sale"). They are intended to draw the customers' attention to products, which may be new products, or on special offer, and are also used to promote special events, e.g. seasonal or holiday-time sales. POS displays can include shelf edging, dummy packs, display packs, display stands, mobiles, posters, and banner.
1.2 Statements of the Problem 1.2.1 General Problem How to develop a computerized Inventory System for Akihabara Store that will help them to monitor stocks available, make their transaction much easier and faster.
How can the proposed system speed-up every transaction. -In AKIHABARA store they use manual processing system in every transaction. They also encounter some problems in monitoring their products or available products in just a short period of time because AKIHABARA Store cannot count the damage items.
How can the proposed system find the product and price immediately and monitor those products that are about to be pace out. -Akihabara Store is having a problem when it comes in monitoring their stocks or available products because it will take a lot time in counting all the products everyday. They always do their counting in physical on different categories. It also hard for them to find out if there a product that is already out of stock or pace out. They cannot count the damage items and return items because the company has no records.
How to design a well secured access to provide security access module asking for password to prevent the illegal access in the system. -Because Akihabara Store is using log book in their inventory, their inventory may access illegal by anyone.
How to provide different level or accession for each user to make more secure. -Because of using manual inventory system Akihabara Store have no level of Accessibility for each user to secure all the information inside the system both the administrator and cashier is allowed to perform transaction even though there no approval of the administrator.
1.3 Statements of Objectives 1.3.1 General Objective The proponents aim to develop a Computerized Inventory System for Akihabara Store that will help monitoring the stocks available, speed-up and make their transaction much easier. 1.3.2 Specific Objectives
The proponent aim to develop a module that will speed up transactions for every client. - This module will give an accurate computation for every payment.
The proponent aim to develop a module that will help both administrator and cashier to immediately monitor all products and its prices and those products that need to pace out. - This study aims to develop a module to monitor stocks easily.
To design well secured access to provide security access module asking for password to prevent the illegal access in the system. - This study aims to develop a form for the security of the information about the system by means of inputting password.
To provide different level of accessibility for each user for the security of information inside the system. - This study aims to make a module with level of accession that identifies whether the user is
authorized to use the system or not. Any unauthorized user cannot access the system.
1.4 Significance of the Study Proponent It will help the proponents to apply and enhance their knowledge in developing software. This study can be considered as a stepping stones in achieving their goals in the future.
Employee It will improve their works efficiency by automating routinely and time consuming task such as the time spent in monitoring product information.
Akihabara Store The Computerized Inventory System would eliminate the need of constantly encoding lengthy details of products by having an inventory database.
1.5 Scope and Limitation of the Study Computerized Inventory System for Akihabara Store 5
Scopes
File Maintenance This will allow the user to update information about the client. This will also secure necessary information of clients inside the system. The user can also add new client and modify their information. Whenever they needed too, and save it to have updated information of them. The user can also delete clients in the system. One of the most important use of the file maintenance is you can easily locate information that you need by clicking the button search. Transaction This will help the user to have an accurate computation for every payment. This system will also ensure that every transaction is updated and was saved in the systems databases. The system will also show history of payment of clients. Reports This will allow the user to view or print every needed report by business. This include sales report, claiming report, critical report of stocks, expenses reports, item store and audit trail. This stocks reports are updated its time and date. Utilities The utility contains back-up and restore. The user can back-up databases by browsing it and locate it to the other drive of the computer. The user can also retrieve the database by browsing it and locate it again to the system. Settings This will allow the user to change the username and password of users and its accessibility. Limitations
Online Ordering The customer cannot buy through online. They still have to go to store to buy. Other payments other than Cash Payments should only be in cash. Credit card, ATM card etc, cannot be accepted.
Customer Communication This task requires establishing effective communication between the developer and the customer. We conducted interviews, scheduled data gathering activities, distribution of questionnaires and observation within the company. Identification of the problem and the customers expectations with the proposed system was also included.
This task requires determining resources, timelines, and other project related information We distributed tasks for every member, created questionnaires for interview, developed a project planning with the help of Gantt-chart to manage sequencing of time activities.
Risk Analysis This task requires to assess the both technical and management risks. Testing for the intended output prior to release was done. This technique helps to define preventive measures to reduce the probability of possible negative effects on the competitiveness of the company.
Engineering This task requires building one or more representation of the application. We designed and constructed the system using Microsoft Visual Basic 6.0 (front-end) and SQL (backend), adding systems functionality, features, as well as creating and building the system using the necessary hardware, software, human resources plus the information gathered during customer communication task.
Construction and Release This task requires constructing, testing, installing, and providing user just like documentation and training. It pertains to the actual setting of the system including final testing, documenting of modules used in the system, releasing and installing, and also demonstration to the end user how the system operates.
Customer Evaluation This task requires obtaining customer feedback based on evolution of the software representation created during the engineering stage and implemented during the installation. Evaluation of the system whether has achieved the intended outcome or not. In case of negative feedback, we will to go back to the customer communication task and repeat the cycle until the project gets done with satisfying performance.
3.0 Data Gathering Procedures and Output The proponents prepared questionnaire before the interview with Mr. Santiago, the manager of Akibaharas store. The interview with Mr. Santiago is very effective to obtain information from him.
Interview In this part, the proponent asked questions to the people working in the store. The manager and the other personnel of the store we asked about their current system also the problems they have encountered. It will give the proponents an idea on how to enhance the proposed system.
Questionnaire The proponents gave questionnaire to the owner of Akihabara store. The owner answered these questions they may help to improve the system.
Collecting Documents
We requested for some copies of the document relevant to the business transaction. We collected some written procedure for their transaction and reports. These reports include the list of items sold on their company of their corresponding prices.
Research The proponent made some research through thesis books and internet. We gathered additional information that we can apply to our proposed system.
Akihabara Company is an action figure store. They have many customers, but theres one thing problem about their transaction processing system. Especially, when the customers are buying in Akihabaras product because they are just using a manual processing system. Akihabaras store are start when the owner of a store buy a second hand gadgets, different kind of keychain, some movie collection figures and lots of miniature/minifigure and lots of stuff toys. They start for a small store thats why they still to sell and serve. They only have 3 kinds of product. Collection figures, stuff toys, electronics Some of their items have damaged, because its just a second hand items from Japan.
4.2 Description of the System Computerized Inventory System for Akihabara Store 10
Akihabara store are using manual inventory system. They said that the purpose of manual inventory lead them to something losing some of their product. They always do their counting in physical on different categories and product. Sometimes Akihabara cannot count the damage items and return items because the company has no records.
4.3 Data Dictionary Cashier In a shop, a cashier (or checkout assistant) is a person who scans the goods through a machine called a cash register that the consumer wishes to purchase at the retail store. After all of the goods have been scanned, the cashier then collects payment for the goods or services exchanged. In one form or another, cashiers have been around for thousands of years. In many businesses, such as grocery stores. The cashier is a "stepping stone" position. Many employers require employees to be cashiers in order to move up to customer service or other positions such as produce.
Product
Product liability laws vary from state to state, but the basic premise is that companies have a duty to protect consumers from potential hazards, even if the damage is primarily caused by consumer negligence or deliberate misuse. Courts have held that manufacturers generally have more innate knowledge about their products, so it falls on them to assume financial responsibility for injuries and property damage. Computerized Inventory System for Akihabara Store 11
Manager A manager is a person tasked with overseeing one or more employees or departments to ensure these employees or departments carry out assigned duties as required. Depending on the size of the company there might be a single, dual or triple management layer involved. Customer The term customer loyalty is used to describe the behavior of repeat customers, as well as those that offer good ratings, reviews, or testimonials. Some customers do a particular company a great service by offering favorable word of mouth publicity regarding a product, telling friends and family, thus adding them to the number of loyal customers. However, customer includes much more. It is a process, a program, or a group of programs geared toward keeping a client happy so he or she will provide more business.
Suppliers Suppliers are individuals or businesses that provide goods or services to vendors in return for the agreed upon compensation. As such, suppliers do not generally interact with consumers directly, leaving that task to vendors or shop owners. It is not unusual for a supplier to provide volume discounts to vendors when they agree to sign long-term contracts or place orders for large quantities.
Data Flow Diagram A data flow diagram (DFD) is a graphical representation of the "flow" of data through an information system. DFDs can also be used for the visualization of data processing (structured Computerized Inventory System for Akihabara Store 12
design). A DFD provides no information about the timing of processes, or about whether processes will operate in sequence or in parallel. It is therefore quite different from a flowchart, which shows the flow of control through an algorithm, allowing a reader to determine what operations will be performed, in what order, and under what circumstances, but not what kinds of data will be input to and output from the system, nor where the data will come from and go to, nor where the data will be stored (all of which are shown on a DFD).
4.5 Problem Areas The inventory system helps the business in listing and computing items. Akihabara store is having difficulties in listing the items. They also have difficulties in computing of items. They have this problem because they are just using manual inventory. Sometimes, they having problem in their inventory reports that lead them to under stocking. Akihabara Stores another problem is because they are using manual Inventory sometimes, they experience losing of items. Because of this problem, an adjustment of their Inventory is required.
5.1 System Overview Our group is proposing a system that will aid the management of Akihabara Store. It will allow the business to generate reports and files without consuming lots of time
13
doing a manual inventory. It will also enable the user to create and maintain the inventory about the status of its peripherals sales, and the number of stocks.
Monitoring of Items This is when the sales personnel noticed that the displayed items in the selling area are few, or the specific item reached its reorder level the sales personnel will prepare and order list report that will be presented to the manage. Monitor the number of items in the selling area and stock room. It will also monitor the replacing of items if the products are expired, damaged or lost. It will monitor the movements of the product that happen when products on the stockroom are lessened during a sales transaction.
Selling Items Selling is responding to consumer needs and wants through planned, personalized communication in order to influence purchase decisions and ensure satisfaction. The existing system in selling is when a customer buys particular product in store, the sales personnel will be to serve the customer. First, he will ask what the customer wants, the customer may respond verbally of what he needs.
Generating Sales Reports A module that will generate reports to the weekly, monthly and annual sales of the company. It will also generate inventory system reports, critical point, damaged item
14
report. It will also generate the reorder list report, lost/damaged list report, and stock adjustments report.
Ordering of Stocks Business that have an Inventory and sell products usually have what is called stock, stock are units of the product they sell that is stored for when the stores shelves need refilling as when somebody places an order, or an similar scenario. It basically there to speed the process along instead of using production methods like made to order or just in time, both of which do not hold any stock. Using a stock order method the units are ready and waiting. 5.2 Process Specification
Customer
Cashier
inquire Item information List of order Official receipt Issue Official Receipt Customers order Accept customer Information Receive Official receipt Sales Monthly Report
Supplier
Manager
16
Customer
Send customer Information
Custom er File
Maintena nce
Cashier
Critical Level
Manager
List of order
Item File
Maintenanc e
Updates
Item to be sell
Maintena nce
Delivered Items
Supplier
Customer
Receive OR
Cashier
Issue OR
Item Info
List of Order
2.0
Payments
Receive Payments
Inquire
Item Info
Customer
Receive OR
Issue OR
Cashier
Transaction Walk In
Receive Payments
19
Cashier Handle cash and credit payments; make change, give receipts, Account for all payments, and perform related clerical duties in many kinds of businesses CASHIERWRAPPERS operate cash registers to compute and Record sales and wrap merchandise for customers.
Product Product (business) an item that ideally satisfies a market's want or need Product (project management), a deliverable or set of deliverables that contribute to a business solution.
An Entity Relationship Diagram (ERD) is a snapshot of data structures. ERD show entities in a database and relationships between tables within that database. It is essential to have one of these if you want to create a good database design. The patterns help focus on how the database actually works with all of the interactions and data flows, although another useful tool is a Data Flow Diagram (DFD) which more directly describes this. 5.3.2 Tables / Files Layout A. tblCustomer Computerized Inventory System for Akihabara Store 20
21
D. tblBackPay -
23
24
B. Log In
25
>Supplier Information
26
27
Full Payment
Customer Balance
28
29
Claiming Reservation
Walk In
30
31
Delivery Information
32
E. Backup Database
F. Restore Database
33
H. System Lock
J. Change Password
34
K. Accessibility
35
36
B. Critical Level
37
38
D. Item Stock
39
40
G. Expenses
41
B. Log In
42
>Supplier Information
43
44
Customer Sale
45
Customer Balance
46
Claiming Reservation
47
Walk In
48
Delivery Information
49
E. Backup Database
F. Restore Database
50
H. System Lock
51
J. Change Password
K. Accessibility
52
53
6.0 System Coding (Prototype) Flash Private Sub Timer1_Timer() PB1.Value = PB1.Value + 1 Label3 = PB1.Value & " %" If PB1.Value = 100 Then Unload Me ' frmMain.Show ' frmMain.Enabled = True Call main(False) frmLogIn.Show Timer1.Enabled = False End If End Sub Log In Dim c As Integer Dim a, b Sub Access() If rs.State = 1 Then rs.Close rs.Open "Select * from tblAccess where Name = '" & a & "'", db If rs.RecordCount <> 0 Then frmMain.mnuAccount.Enabled = rs!mnuAccount frmMain.mnuCustomer.Enabled = rs!mnuCustomer frmMain.mnuSupplier.Enabled = rs!mnuSupplier frmMain.mnuItem.Enabled = rs!mnuItem frmMain.mnuCustomer2.Enabled = rs!mnuCustomer2 frmMain.mnuSupplier2.Enabled = rs!mnuSupplier2 frmMain.mnuAudit.Enabled = rs!mnuAudit frmMain.mnuCancel.Enabled = rs!mnuCancel frmMain.mnuExpenses.Enabled = rs!mnuExpenses frmMain.mnuItemStock.Enabled = rs!mnuItemStock frmMain.mnuPOS.Enabled = rs!mnuPOS Computerized Inventory System for Akihabara Store 54
frmMain.mnuPending.Enabled = rs!mnuPending frmMain.mnuDatabase.Enabled = rs!mnuDatabase frmMain.mnuCustomerRestore.Enabled = rs!mnuCustomerRestore frmMain.mnuLock.Enabled = rs!mnuLock frmMain.mnuCalc.Enabled = rs!mnuCalc frmMain.mnuNotepad.Enabled = rs!mnuNotepad frmMain.mnuAccess.Enabled = rs!mnuAccess frmMain.mnuCP.Enabled = rs!mnuCP frmMain.mnuValid.Enabled = rs!mnuValid frmMain.mnuClaimR.Enabled = rs!mnuClaimR frmMain.mnuCritical.Enabled = rs!mnuCritical frmMain.Toolbar1.Buttons.item(1).Enabled = rs!mnuCustomer frmMain.Toolbar1.Buttons.item(3).Enabled = rs!mnuPOS frmMain.Toolbar1.Buttons.item(4).Enabled = rs!mnuLock frmMain.Toolbar1.Buttons.item(6).Enabled = rs!mnuAccount End If End Sub Private Sub cmdCancel_Click() txtUser = "" txtPass = "" cboLevel.clear cboLevel.AddItem "Admin" cboLevel.AddItem "Cashier" End Sub Private Sub cmdLog_Click() If Text1 = "" Then If rs.State = 1 Then rs.Close rs.Open "Select * from tblLogIn where UserName = '" & txtUser & " ' and Password = '" & txtPass & "' and Level = '" & cboLevel & "' ", db If rs.RecordCount <> 0 Then If "Admin" = cboLevel Then a = rs!Name b = rs!Level Call Access Unload Me frmMain.Show frmMain.txtUser = a 55
'
frmMain.txtlevel = b frmValidation.Show frmMain.Toolbar1.Visible = False bilang2 = 1 Else a = rs!Name b = rs!Level Call Access Unload Me frmMain.Show frmMain.txtUser = a frmMain.txtlevel = b frmValidation.Show frmMain.Toolbar1.Visible = False
'
End If ElseIf cboLevel = "" Then MsgBox "Choose in Security Level", vbCritical, "Log In" cboLevel.SetFocus ElseIf txtUser = "" Then MsgBox "Enter your UserName", vbCritical, "Log In" txtUser.SetFocus ElseIf txtPass = "" Then MsgBox "Enter your Password", vbCritical, "Log In" txtPass.SetFocus Else MsgBox " Invalid UserName / Password / Security Level ", vbCritical, "Log In" txtUser = "" txtPass = "" txtUser.SetFocus c=c+1 End If If c = 3 Then MsgBox "You Enter three times in Valid... " & Chr(13) & " Automatic close the System", vbInformation, "Log In" frmAdmin.Show frmAdmin.cmdBack.Visible = False Unload Me End If Computerized Inventory System for Akihabara Store 56
ElseIf Text1 = 1 Then If rs.State = 1 Then rs.Close rs.Open "Select * from tblLogIn where UserName = '" & txtUser & " ' and Password = '" & txtPass & "' and Level = '" & cboLevel & "' ", db If rs.RecordCount <> 0 Then If "Admin" = cboLevel Then a = rs!Name b = rs!Level Call Access Unload Me frmMain.Enabled = True frmMain.Toolbar1.Visible = False ' frmMain.Show bilang2 = 1 frmMain.txtUser = a frmMain.txtlevel = b If rs.State = 1 Then rs.Close rs.Open "Select * from tblitem ", db Do While rs.EOF <> True If rs!qty <= 5 Then sum = sum + 1 End If rs.MoveNext Loop If 0 < sum Then frmCritical.Show Else Call main(True) frmMain.Toolbar1.Visible = False End If Else a = rs!Name b = rs!Level Call Access Unload Me frmMain.Enabled = True ' frmMain.Show frmMain.txtUser = a frmMain.txtlevel = b If rs.State = 1 Then rs.Close Computerized Inventory System for Akihabara Store 57
rs.Open "select * from tblItem ", db If rs!qty <= 5 Then frmCritical.Show Else Call main(True) frmMain.Toolbar1.Visible = False End If End If ElseIf cboLevel = "" Then MsgBox "Choose in Security Level", vbCritical, "Log In" cboLevel.SetFocus ElseIf txtUser = "" Then MsgBox "Enter your UserName", vbCritical, "Log In" txtUser.SetFocus ElseIf txtPass = "" Then MsgBox "Enter your Password", vbCritical, "Log In" txtPass.SetFocus Else MsgBox " Invalid UserName / Password / Security Level ", vbCritical, "Log In" txtUser = "" txtPass = "" txtUser.SetFocus c=c+1 End If If c = 3 Then MsgBox "You Enter three times in Valid... " & Chr(13) & " Automatic close the System", vbInformation, "Log In" frmAdmin.Show frmAdmin.cmdBack.Visible = False frmMain.Enabled = False Unload Me End If End If End Sub Private Sub Form_Load() cboLevel.AddItem "Admin" cboLevel.AddItem "Cashier" Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 Call opendb c=0 End Sub Computerized Inventory System for Akihabara Store 58
'Private Sub txtUser_LostFocus() 'txtUser = StrConv(txtUser, vbProperCase) 'End Sub Date and Time Validation Dim sum As Integer Private Sub cmdBack_Click() Frame1.Visible = False Frame2.Visible = True End Sub Private Sub cmdFormat_Click() Frame1.Visible = True Frame2.Visible = False DTime = LTime DDate = LDate End Sub Private Sub cmdMain_Click() Unload Me frmMain.Show If rs.State = 1 Then rs.Close rs.Open "Select * from tblitem ", db Do While rs.EOF <> True If rs!qty <= 5 Then sum = sum + 1 End If rs.MoveNext Loop If 0 < sum Then frmCritical.Show Else Call main(True) frmMain.Toolbar1.Visible = True End If End Sub Private Sub cmdOk_Click() 'DDate = Date Computerized Inventory System for Akihabara Store 59
'DTime = Time 'Frame2.Visible = True 'Frame1.Visible = False 'Unload Me 'frmCritical.Show Unload Me frmMain.Show If rs.State = 1 Then rs.Close rs.Open "Select * from tblitem ", db Do While rs.EOF <> True If rs!qty <= 5 Then sum = sum + 1 End If rs.MoveNext Loop If 0 < sum Then frmCritical.Show Else Call main(True) Toolbar1.Visible = True End If End Sub Private Sub Form_Load() Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 LDate = Date LTime = Time End Sub Form Main Private Sub mnuAccess_Click() Call main(False) Toolbar1.Visible = False frmAccess.Show End Sub Computerized Inventory System for Akihabara Store 60
Private Sub mnuAccount_Click() Call main(False) Toolbar1.Visible = False frmAccount.Show End Sub Private Sub mnuAudit_Click() Call main(False) Toolbar1.Visible = False frmAudit.Show End Sub Private Sub mnuAuthor_Click() Call main(False) FrmAuthor.Show FrmAuthor.fra1.Visible = False FrmAuthor.fra2.Visible = False FrmAuthor.fra3.Visible = False FrmAuthor.fra4.Visible = False FrmAuthor.fra5.Visible = False FrmAuthor.fra6.Visible = False Toolbar1.Visible = False End Sub Private Sub mnuBackup_Click() Call main(False) frmBackUp.Show Toolbar1.Visible = False End Sub Private Sub mnuBuySupply_Click() Call main(False) Toolbar1.Visible = False frmPurchaseS.Show End Sub Private Sub mnuCalc_Click() Shell "calc.exe", vbNormalFocus End Sub Private Sub mnuCancel_Click() Call main(False) Computerized Inventory System for Akihabara Store 61
frmCancelITemR.Show Toolbar1.Visible = False End Sub Private Sub mnuClaim_Click() Call main(False) Toolbar1.Visible = False frmClaim.Show End Sub Private Sub mnuClaimR_Click() Call main(False) frmClaimR.Show Toolbar1.Visible = False End Sub Private Sub mnuCP_Click() Call main(False) frmChangePass.Show Toolbar1.Visible = False End Sub Private Sub mnuCritical_Click() Call main(False) Toolbar1.Visible = False frmCritical.Show End Sub Private Sub mnuCustomer_Balance_Click() Call main(False) Toolbar1.Visible = False frmBalance.Show End Sub Private Sub mnuCustomer_Click() Toolbar1.Visible = False Call main(False) frmCR.Show End Sub Private Sub mnuCustomerRestore_Click() Toolbar1.Visible = False Call main(False) Computerized Inventory System for Akihabara Store 62
frmCustomerA.Show End Sub Private Sub mnuDelivery_Click() Toolbar1.Visible = False Call main(False) frmDeliver.Show End Sub Private Sub mnuDown_Click() Toolbar1.Visible = False Call main(False) frmReserveD.Show End Sub Private Sub mnuDP_Click() Toolbar1.Visible = False Call main(False) If bilang2 = 1 Then frmCancelReserve.Show Else bilang = 1 frmAdmin.Show End If End Sub Private Sub mnuExpenses_Click() Toolbar1.Visible = False Call main(False) frmExpenses.Show End Sub Private Sub mnuFP_Click() Toolbar1.Visible = False Call main(False) If bilang2 = 1 Then frmCancelReserveP.Show Else Computerized Inventory System for Akihabara Store 63
bilang = 2 frmAdmin.Show End If End Sub Private Sub mnuFull_Click() Toolbar1.Visible = False Call main(False) frmReserveP.Show End Sub Private Sub mnuItem_Click() Toolbar1.Visible = False Call main(False) frmItemToSell.Show End Sub Private Sub mnuItemStock_Click() Toolbar1.Visible = False Call main(False) frmITemStock.Show End Sub Private Sub mnuLock_Click() Toolbar1.Visible = False Call main(False) frmLock.Show End Sub Private Sub mnuLogOut_Click() Toolbar1.Visible = False Call main(False) frmLogIn.Text1 = "1" frmMain.Enabled = True Call main(False) frmLogIn.Show frmMain.Enabled = False bilang2 = 0 End Sub Private Sub mnuNotepad_Click() Shell "notepad.exe", vbNormalFocus End Sub Computerized Inventory System for Akihabara Store 64
Private Sub mnuPending_Click() Toolbar1.Visible = False Call main(False) frmPendingS.Show End Sub Private Sub mnuPOS_Click() Call main(False) Toolbar1.Visible = False frmPOS.Show End Sub Private Sub mnuRestore_Click() Call main(False) Toolbar1.Visible = False frmRestore.Show End Sub Private Sub mnuStock_Click() Toolbar1.Visible = False End Sub Private Sub mnuSupplier_Click() frmItem.Show Call main(False) Toolbar1.Visible = False End Sub Private Sub mnuValid_Click() frmValidation.Show Call main(False) Toolbar1.Visible = False End Sub Private Sub mnuWalkIn_Click() frmWalkIn.Show Call main(False) Toolbar1.Visible = False End Sub Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button) If Button.Index = 1 Then Computerized Inventory System for Akihabara Store 65
frmCR.Show Call main(False) Toolbar1.Visible = False ElseIf Button.Index = 2 Then frmWalkIn.Show Toolbar1.Visible = False Call main(False) ElseIf Button.Index = 3 Then frmPOS.Show Toolbar1.Visible = False Call main(False) ElseIf Button.Index = 4 Then frmLock.Show Toolbar1.Visible = False Call main(False) ElseIf Button.Index = 5 Then Shell "calc.exe", vbNormalFocus ElseIf Button.Index = 6 Then frmAccount.Show Toolbar1.Visible = False Call main(False) ElseIf Button.Index = 7 Then FrmAuthor.Show Toolbar1.Visible = False Call main(False) End If End Sub Customer Information Dim a As Integer Sub clear() txtFName = "" txtLName = "" txtMName = "" txtStreet = "" txtMuni = "" txtBrgy = "" txtNo = "" txtID = "" End Sub Sub sdc() Computerized Inventory System for Akihabara Store 66
Call opendb cboSearch.clear Call cbo Call btn(False) cmdAdd.Enabled = True cmdBack.Enabled = True lblCustomer = "" lv1.Enabled = False lv1.ListItems.clear Call clear Frame1.Enabled = True Call txt(False) End Sub Sub cbo() cboSearch.AddItem "Customer ID" cboSearch.AddItem "First Name" cboSearch.AddItem "Last Name" cboSearch.AddItem "Municipality" cboSearch.AddItem "Gender" End Sub Sub txt(X As Boolean) txtFName.Enabled = X txtLName.Enabled = X txtMName.Enabled = X txtStreet.Enabled = X txtBrgy.Enabled = X txtMuni.Enabled = X txtNo.Enabled = X cboGender.Enabled = X DBirth.Enabled = X End Sub Sub btn(X As Boolean) cmdAdd.Enabled = X cmdEdit.Enabled = X cmdSave.Enabled = X cmdDelete.Enabled = X cmdCancel.Enabled = X End Sub Private Sub cboSearch_Click() lv1.ListItems.clear lblCustomer = "" txtSearch = "" Computerized Inventory System for Akihabara Store 67
End Sub Private Sub cmdAdd_Click() a=1 cboGender.clear cboGender.AddItem "Male" cboGender.AddItem "Female" lv1.ListItems.clear Call btn(False) cmdSave.Enabled = True cmdCancel.Enabled = True Call txt(True) Frame1.Enabled = False lblCustomer = "" If rs.State = 1 Then rs.Close rs.Open "Select * from tblCustomer order by tblCustomer.ID", db If rs.RecordCount <> 0 Then rs.MoveLast i = Val(Right(rs!ID, 4)) txtID = Format(i + 1, "0000") Else txtID = "0001" End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtuser rs!Level = frmMain.txtlevel rs!Access = "Customer Information " rs!Desc = "Add button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdBack_Click() If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtuser Computerized Inventory System for Akihabara Store 68
rs!Level = frmMain.txtlevel rs!Access = "Customer Information " rs!Desc = "Back button" rs!Date = Date rs!Time = Time rs.Update rs.Close Unload Me frmMain.Show Call main(True) frmMain.Toolbar1.Visible = True End Sub Private Sub cmdCancel_Click() Call sdc cboGender.clear If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtuser rs!Level = frmMain.txtlevel rs!Access = "Customer Information " rs!Desc = "Cancel button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdDelete_Click() If MsgBox("Are you sure do you want to delete this Information?", vbQuestion + vbYesNo, "Delete") = vbYes Then If rs.State = 1 Then rs.Close rs.Open "Select * from tblCustomer where ID = '" & txtID & "'", db rs.Delete rs.Update rs.Close rs.Open "Select * from tblCustomerR ", db rs.AddNew rs!ID = txtID rs!Name = txtFName & " " & txtMName & " " & txtLName rs!FName = txtFName Computerized Inventory System for Akihabara Store 69
rs!LName = txtLName rs!MName = txtMName rs!Street = txtStreet rs!Barangay = txtBrgy rs!Municipality = txtMuni rs!Add = txtStreet & " " & txtBrgy & " " & txtMuni rs!ContactNo = txtNo rs!Birthday = DBirth rs!Gender = cboGender rs.Update rs.Close MsgBox "Record Deleted", vbInformation, "Delete" Call sdc End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtuser rs!Level = frmMain.txtlevel rs!Access = "Customer Information " rs!Desc = "Delete button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdEdit_Click() a=2 cboGender.AddItem "Male" cboGender.AddItem "Female" Call txt(True) Call btn(False) cmdSave.Enabled = True cmdCancel.Enabled = True If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtuser rs!Level = frmMain.txtlevel rs!Access = "Customer Information " rs!Desc = "Edit button" Computerized Inventory System for Akihabara Store 70
rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdSave_Click() If a = 1 Then If rs.State = 1 Then rs.Close rs.Open "Select * from tblCustomer where ID = '" & txtID & " ' ", db If rs.RecordCount <> 0 Then ElseIf txtFName = "" Then MsgBox "Please input the First Name Name", vbCritical, "WBS" txtFName.SetFocus ' ElseIf txtMName = "" Then ' txtMName = "N/A" ' txtMName.SetFocus ElseIf txtLName = "" Then MsgBox "Please input the Last Name Name", vbCritical, "WBS" txtLName.SetFocus ElseIf txtStreet = "" Then MsgBox "Please input The Street", vbCritical, "WBS" txtStreet.SetFocus ElseIf txtBrgy = "" Then MsgBox "Please input the Baranggay", vbCritical, "WBS" txtBrgy.SetFocus ElseIf txtMuni = "" Then MsgBox "Please input the Municipality", vbCritical, "WBS" txtMuni.SetFocus ' ElseIf txtNo = "" Then ' txtNo = "00000000000" ' ElseIf cboGender = "" Then MsgBox "Please input the Gender", vbCritical, "WBS" cboGender.SetFocus ElseIf DBirth = "" Then MsgBox "Please input the Birthday", vbCritical, "WBS" DBirth.SetFocus Else rs.AddNew rs!ID = txtID rs!Name = txtFName & " " & txtMName & " " & txtLName rs!FName = txtFName rs!LName = txtLName Computerized Inventory System for Akihabara Store 71
rs!MName = txtMName rs!Street = txtStreet rs!Barangay = txtBrgy rs!Municipality = txtMuni rs!Add = txtStreet & " " & txtBrgy & " " & txtMuni rs!ContactNo = txtNo rs!Birthday = DBirth rs!Gender = cboGender rs.Update rs.Close MsgBox "Successful Add" Call sdc cboGender.clear End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtuser rs!Level = frmMain.txtlevel rs!Access = "Customer Information " rs!Desc = "Save button" rs!Date = Date rs!Time = Time rs.Update rs.Close ElseIf a = 2 Then If rs.State = 1 Then rs.Close rs.Open "Select * from tblCustomer where ID = '" & txtID & " ' ", db If rs.RecordCount <> 0 Then rs!Name = txtFName & " " & txtMName & " " & txtLName rs!FName = txtFName rs!LName = txtLName rs!MName = txtMName rs!Street = txtStreet rs!Barangay = txtBrgy rs!Municipality = txtMuni rs!Add = txtStreet & " " & txtBrgy & " " & txtMuni rs!ContactNo = txtNo rs!Gender = cboGender rs!Birthday = DBirth rs.Update rs.Close MsgBox "Successful Edited", vbInformation, "WBS" Computerized Inventory System for Akihabara Store 72
Call sdc cboGender.clear End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtuser rs!Level = frmMain.txtlevel rs!Access = "Customer Information " rs!Desc = "Update button" rs!Date = Date rs!Time = Time rs.Update rs.Close End If End Sub Private Sub Command1_Click() lv1.Enabled = True cboSearch.clear lblCustomer = "" lv1.ListItems.clear txtSearch = "" Call cbo If rs.State = 1 Then rs.Close rs.Open "Select * from tblCustomer order by tblcustomer.ID ", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!Name List.SubItems(2) = rs!Add List.SubItems(3) = rs!Gender lblCustomer = "Total Customer is: " & " " & rs.RecordCount rs.MoveNext lv1.Enabled = True Loop End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtuser rs!Level = frmMain.txtlevel Computerized Inventory System for Akihabara Store 73
rs!Access = "Customer Information " rs!Desc = "Seach All button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub Form_Load() cboGender.AddItem "Male" cboGender.AddItem "Female" Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 a=0 Call opendb Call cbo Call btn(False) cmdAdd.Enabled = True cmdBack.Enabled = True lblCustomer = "" Call txt(False) DBirth = Date
If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtuser rs!Level = frmMain.txtlevel rs!Access = "Customer Information " rs!Desc = "Form Load" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub lv1_DblClick() If rs.State = 1 Then rs.Close rs.Open "Select * from tblCustomer where ID='" & lv1.SelectedItem & "'", db Computerized Inventory System for Akihabara Store 74
If rs.RecordCount <> 0 Then txtID = rs!ID txtFName = rs!FName txtLName = rs!LName txtMName = rs!MName txtStreet = rs!Street txtBrgy = rs!Barangay txtNo = rs!ContactNo txtMuni = rs!Municipality cboGender.text = rs!Gender DBirth = rs!Birthday End If Frame1.Enabled = False Call btn(False) cmdEdit.Enabled = True cmdDelete.Enabled = True cmdCancel.Enabled = True Call txt(False) End Sub Private Sub txtBrgy_LostFocus() txtBrgy = StrConv(txtBrgy, vbProperCase) End Sub Private Sub txtFName_LostFocus() txtFName = StrConv(txtFName, vbProperCase) End Sub Private Sub txtLName_LostFocus() txtLName = StrConv(txtLName, vbProperCase) End Sub Private Sub txtMName_LostFocus() txtMName = StrConv(txtMName, vbProperCase) End Sub Private Sub txtMuni_LostFocus() txtMuni = StrConv(txtMuni, vbProperCase) End Sub Private Sub txtNo_KeyPress(KeyAscii As Integer) KeyAscii = check_key_press(KeyAscii) End Sub Private Sub txtSearch_Change() lblCustomer = "" lv1.ListItems.clear Computerized Inventory System for Akihabara Store 75
'If cboSearch = "" Or txtSearch = "" Then ' MsgBox "Please Fill up the search by and textsearch" If cboSearch = "Customer ID" Then lv1.Enabled = True If rs.State = 1 Then rs.Close rs.Open "Select * from tblCustomer where ID like '" & txtSearch & "%'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!Name List.SubItems(2) = rs!Add List.SubItems(3) = rs!Gender lblCustomer = "Total Customer is: " & " " & rs.RecordCount rs.MoveNext lv1.Enabled = True Loop Else MsgBox "Record Not Found", vbCritical, "Customer" txtSearch = "" txtSearch.SetFocus lblCustomer = "" End If ' rs.Close ElseIf cboSearch = "First Name" Then lv1.Enabled = True If rs.State = 1 Then rs.Close rs.Open "Select * from tblCustomer where FName like '" & txtSearch & "%'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!Name List.SubItems(2) = rs!Add List.SubItems(3) = rs!Gender lblCustomer = "Total Customer is: " & " " & rs.RecordCount rs.MoveNext lv1.Enabled = True Loop Else MsgBox "Record Not Found", vbCritical, "Customer" txtSearch = "" txtSearch.SetFocus lblCustomer = "" Computerized Inventory System for Akihabara Store 76
End If ' rs.Close ElseIf cboSearch = "Last Name" Then lv1.Enabled = True If rs.State = 1 Then rs.Close rs.Open "Select * from tblCustomer where LName like '" & txtSearch & "%'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!Name List.SubItems(2) = rs!Add List.SubItems(3) = rs!Gender lblCustomer = "Total Customer is: " & " " & rs.RecordCount rs.MoveNext lv1.Enabled = True Loop Else MsgBox "Record Not Found", vbCritical, "Customer" txtSearch = "" txtSearch.SetFocus lblCustomer = "" End If ' rs.Close ElseIf cboSearch = "Municipality" Then lv1.Enabled = True If rs.State = 1 Then rs.Close rs.Open "Select * from tblCustomer where Municipality like '" & txtSearch & "%'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!Name List.SubItems(2) = rs!Add List.SubItems(3) = rs!Gender lblCustomer = "Total Customer is: " & " " & rs.RecordCount rs.MoveNext lv1.Enabled = True Loop Else MsgBox "Record Not Found", vbCritical, "Customer" txtSearch = "" txtSearch.SetFocus lblCustomer = "" End If Computerized Inventory System for Akihabara Store 77
' rs.Close ElseIf cboSearch = "Gender" Then lv1.Enabled = True If rs.State = 1 Then rs.Close rs.Open "Select * from tblCustomer where Gender like '" & txtSearch & "%'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!Name List.SubItems(2) = rs!Add List.SubItems(3) = rs!Gender lblCustomer = "Total Customer is: " & " " & rs.RecordCount rs.MoveNext lv1.Enabled = True Loop Else MsgBox "Record Not Found", vbCritical, "Customer" txtSearch = "" txtSearch.SetFocus lblCustomer = "" End If ' rs.Close End If End Sub Private Sub txtSearch_Click() If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtuser rs!Level = frmMain.txtlevel rs!Access = "Customer Information " rs!Desc = "Type in text " rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub txtStreet_LostFocus() txtStreet = StrConv(txtStreet, vbProperCase) End Sub Computerized Inventory System for Akihabara Store 78
Supplier Information Dim R, z As Integer Sub btn(X As Boolean) cmdAdd.Enabled = X cmdEdit.Enabled = X cmdSave.Enabled = X cmdDelete.Enabled = X cmdCancel.Enabled = X cmdNew.Enabled = X cmdBack.Enabled = False End Sub Sub sdc() Call btn(False) cmdAdd.Enabled = True cmdBack.Enabled = True Frame2.Enabled = True Call txt(False) Call clear Call searchall cboOld.Visible = True Call item txtpic = "" End Sub Sub txt(X As Boolean) txtName.Enabled = X txtPrice.Enabled = X txtCategories.Enabled = X cboOld.Enabled = X txtItemName.Enabled = X End Sub Sub clear() txtName = "" txtQty = "" txtPrice = "" txtCategories = "" cboOld.clear cboCate.clear txtID = "" Computerized Inventory System for Akihabara Store 79
txtItemName = "" End Sub Sub item() If rs.State = 1 Then rs.Close rs.Open "Select * from tblGroup order by tblGroup.Grouped", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True cboOld.AddItem rs!Grouped rs.MoveNext Loop End If rs.Close cboCate.AddItem "Supplier Name" cboCate.AddItem "Item Group" End Sub Sub searchall() If rs.State = 1 Then rs.Close rs.Open "Select * from tblSupplier order by tblSupplier.ID", db Do While rs.EOF <> True Set List = lv.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!Name List.SubItems(2) = rs!Groups lblTotal = "Total Item is: " & " " & rs.RecordCount rs.MoveNext lv.Enabled = True Loop rs.Close End Sub Private Sub cboCate_Click() lv.ListItems.clear lblTotal = "" End Sub Private Sub cboOld_Click() Text1 = cboOld txtCategories = cboOld End Sub Private Sub cmdAdd_Click() R=1 lv.ListItems.clear lblTotal = "" Computerized Inventory System for Akihabara Store 80
Frame2.Enabled = False Call btn(False) cmdSave.Enabled = True cmdCancel.Enabled = True cmdNew.Enabled = True Call txt(True) txtName.SetFocus z=1 cmdNew.Caption = "New" If rs.State = 1 Then rs.Close rs.Open "Select * from tblSupplier order by tblSupplier.ID", db If rs.RecordCount <> 0 Then rs.MoveLast i = Val(Right(rs!ID, 4)) txtID = Format(i + 1, "0000") Else txtID = "0001" End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtuser rs!Level = frmMain.txtlevel rs!Access = "Supplier Information" rs!Desc = "Add button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdBack_Click() If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtuser rs!Level = frmMain.txtlevel rs!Access = "Supplier Information" rs!Desc = "Back button" rs!Date = Date rs!Time = Time rs.Update Computerized Inventory System for Akihabara Store 81
rs.Close Unload Me frmMain.Show Call main(True) frmMain.Toolbar1.Visible = True End Sub Private Sub cmdBrowse_Click() cd1.Filter = "(*.jpg)|*.jpg" cd1.ShowSave txtpic = cd1.FileTitle p = txtpic txtpic = p Image1.Picture = LoadPicture(p) End Sub Private Sub cmdCancel_Click() Call sdc If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtuser rs!Level = frmMain.txtlevel rs!Access = "Supplier Information" rs!Desc = "Cancel button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdClear_Click() lv.ListItems.clear cboCate.clear Call searchall txtHere = "" Call item If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtuser rs!Level = frmMain.txtlevel rs!Access = "Supplier Information" Computerized Inventory System for Akihabara Store 82
rs!Desc = "Clear button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdDelete_Click() If MsgBox("Do you want to Delete this Item?", vbQuestion + vbYesNo, "Delete") = vbYes Then If rs.State = 1 Then rs.Close rs.Open "Select * from tblSupplier where Name = '" & txtName & "'", db rs.Delete rs.Update rs.Close Call sdc End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtuser rs!Level = frmMain.txtlevel rs!Access = "Supplier Information" rs!Desc = "Delete button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdEdit_Click() R=2 z=2 Call btn(False) cmdCancel.Enabled = True Call txt(True) cboOld.Visible = False cmdNew.Caption = "Old" cmdNew.Enabled = True cmdSave.Enabled = True txtName.Enabled = False txtCategories.Enabled = False txtItemName.Enabled = False txtQty = "" Computerized Inventory System for Akihabara Store 83
If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtuser rs!Level = frmMain.txtlevel rs!Access = "Supplier Information" rs!Desc = "Edit button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdNew_Click() If z = 1 Then If MsgBox("Do you want to create New Categories?", vbQuestion + vbYesNo, "New Categories") = vbYes Then cboOld.Visible = True txtCategories.Visible = True cmdNew.Enabled = False End If ElseIf z = 2 Then If MsgBox("Do you want to change Categories?", vbQuestion + vbYesNo, "New Categories") = vbYes Then cboOld.Visible = True cmdNew.Enabled = False txtCategories.Visible = False End If End If End Sub Private Sub cmdSave_Click() If R = 1 Then If rs.State = 1 Then rs.Close rs.Open "Select * from tblSupplier", db If txtName = "" Then MsgBox "Please Enter the Item Name" txtName.SetFocus ElseIf txtItemName = "" Then MsgBox "Please Enter the Item Name" txtItemName.SetFocus ElseIf txtPrice = "" Then MsgBox "Please Enter the Item Price" txtPrice.SetFocus ElseIf txtCategories = "" Then Computerized Inventory System for Akihabara Store 84
MsgBox "Please Enter The Categories of the Item" txtCategories.SetFocus Else rs.AddNew rs!Name = txtName rs!Price = Format(txtPrice, "#,###,###,###,###.00") rs!Groups = txtCategories rs!ID = txtID rs!ItemName = txtItemName rs.Update If rs.State = 1 Then rs.Close rs.Open "select * from tblGroup where Grouped= '" & Text1 & "'", db If rs.RecordCount <> 0 Then Else rs.AddNew rs!Grouped = Text1 rs.Update rs.Close End If MsgBox "Successful Update", vbInformation, "Save" Call sdc End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtuser rs!Level = frmMain.txtlevel rs!Access = "Supplier Information" rs!Desc = "Save button" rs!Date = Date rs!Time = Time rs.Update rs.Close ElseIf R = 2 Then If rs.State = 1 Then rs.Close rs.Open "Select * from tblSupplier where ItemName= '" & txtItemName & "' and ID= '" & txtID & "'", db rs!Price = Format(txtPrice, "#,###,###,###,###.00") rs!Groups = txtCategories rs.Update MsgBox "Successful Update", vbInformation, "Update" Call sdc Computerized Inventory System for Akihabara Store 85
If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtuser rs!Level = frmMain.txtlevel rs!Access = "Supplier Information" rs!Desc = "Update button" rs!Date = Date rs!Time = Time rs.Update rs.Close End If End Sub Private Sub Command1_Click() cboOld.Visible = False txtCategories.Visible = True End Sub Private Sub Form_Load() Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 R=0 Call opendb Call item Call searchall Call btn(False) cmdAdd.Enabled = True cmdBack.Enabled = True Call txt(False) txtCategories.Visible = False
If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtuser rs!Level = frmMain.txtlevel rs!Access = "Supplier Information" rs!Desc = "Search All button" rs!Date = Date Computerized Inventory System for Akihabara Store 86
rs!Time = Time rs.Update rs.Close End Sub Private Sub lv_DblClick() If rs.State = 1 Then rs.Close rs.Open "Select * from tblSupplier where ID='" & lv.SelectedItem & "'", db txtName = rs!Name txtItemName = rs!ItemName txtPrice = rs!Price txtCategories = rs!Groups txtID = rs!ID rs.Close lv.ListItems.clear lblTotal = "" Call btn(False) txtCategories.Visible = True cmdEdit.Enabled = True cmdDelete.Enabled = True cmdCancel.Enabled = True Frame2.Enabled = False cboOld.Visible = False End Sub Private Sub txtCategories_LostFocus() txtCategories = StrConv(txtCategories, vbProperCase) Text1 = txtCategories End Sub Private Sub txtHere_Change() lv.ListItems.clear lblTotal = "" If cboCate = "Supplier Name" Then lv.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblSupplier where Name like '" & txtHere & "%'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!Name List.SubItems(2) = rs!Groups lblTotal = "Total Item is: " & " " & rs.RecordCount rs.MoveNext Computerized Inventory System for Akihabara Store 87
lv.Enabled = True Loop Else MsgBox "Record Not Found or Categories", vbCritical, "Customer" txtHere = "" txtHere.SetFocus lblTotal = "" End If 'rs.Close ElseIf cboCate = "Item Group" Then lv.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblSupplier where Groups like '" & txtHere & "%'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!Name List.SubItems(2) = rs!Groups lblTotal = "Total Item is: " & " " & rs.RecordCount rs.MoveNext lv.Enabled = True Loop Else MsgBox "Record Not Found or Categories", vbCritical, "Customer" txtHere = "" txtHere.SetFocus lblTotal = "" End If ' rs.Close End If End Sub Private Sub txtHere_Click() If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtuser rs!Level = frmMain.txtlevel rs!Access = "Supplier Information" rs!Desc = "type text" rs!Date = Date rs!Time = Time Computerized Inventory System for Akihabara Store 88
rs.Update rs.Close End Sub Private Sub txtHere_LostFocus() txtHere = StrConv(txtHere, vbProperCase) End Sub Private Sub txtName_LostFocus() txtName = StrConv(txtName, vbProperCase) End Sub Private Sub txtPrice_LostFocus() txtPrice = Format(txtPrice, "#,###,###,###.00") End Sub Private Sub txtPrice_KeyPress(KeyAscii As Integer) KeyAscii = check_key_press(KeyAscii) End Sub
Item Information Sub cbo() cboSearch.AddItem "Item ID" cboSearch.AddItem "Item Name" cboSearch.AddItem "Item Group" End Sub Sub clear() txtID = "" txtItemName = "" txtItemPrice = "" txtItemGroup = "" txtStockQty = "" txtSellQty = "" txtSellPrice = "" End Sub Private Sub cboSearch_Click() lblTotal = "" lv1.ListItems.clear txtSearch = "" End Sub Computerized Inventory System for Akihabara Store 89
Private Sub cmdBack_Click() If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtuser rs!Level = frmMain.txtlevel rs!Access = "Item Sell Information" rs!Desc = "Back button" rs!Date = Date rs!Time = Time rs.Update rs.Close Unload Me frmMain.Show Call main(True) frmMain.Toolbar1.Visible = True End Sub Private Sub cmdSearchAll_Click() lv1.ListItems.clear txtSearch = "" cboSearch.clear lv1.Enabled = True If rs.State = 1 Then rs.Close rs.Open "Select * from tblStock order by tblstock.id ", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!Groups lblTotal = "Total Item is: " & " " & rs.RecordCount rs.MoveNext lv1.Enabled = True Loop End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtuser rs!Level = frmMain.txtlevel rs!Access = "Item Sell Information" rs!Desc = "Search All button" Computerized Inventory System for Akihabara Store 90
rs!Date = Date rs!Time = Time rs.Update rs.Close Call cbo End Sub Private Sub cmdUpdate_Click() If (Val(txtStockQty) < Val(txtSellQty)) Then MsgBox " out of Range" Else If rs.State = 1 Then rs.Close rs.Open "select * from tblstock where ID= '" & txtID & "'", db rs!qty = Val(rs!qty) - Val(txtSellQty) rs.Update If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ID='" & txtID & "'", db If rs.RecordCount <> 0 Then rs!ItemName = txtItemName rs!ActualPrice = txtItemPrice rs!Price_Sell = Format(txtSellPrice, "#,###,###,###,###.00") rs!qty = Val(rs!qty) + Val(txtSellQty) rs!Groups = txtItemGroup rs.Update Call clear Else rs.AddNew rs!ID = txtID rs!ItemName = txtItemName rs!ActualPrice = txtItemPrice rs!Price_Sell = Format(txtSellPrice, "#,###,###,###,###.00") rs!qty = txtSellQty rs!Groups = txtItemGroup rs.Update Call clear End If End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtuser Computerized Inventory System for Akihabara Store 91
rs!Level = frmMain.txtlevel rs!Access = "Item Sell Information" rs!Desc = "Update button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub Form_Load() Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 Call opendb lblTotal = "" Call cbo If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtuser rs!Level = frmMain.txtlevel rs!Access = "Item Sell Information" rs!Desc = "Form Load" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub lv1_DblClick() If rs.State = 1 Then rs.Close rs.Open "select * from tblstock where ID ='" & lv1.SelectedItem & "'", db txtID = rs!ID txtItemName = rs!ItemName txtStockQty = rs!qty txtItemGroup = rs!Groups txtItemPrice = rs!ItemPrice If rs.State = 1 Then rs.Close rs.Open "Select * from tblitem where Id='" & lv1.SelectedItem & "'", db If rs.RecordCount <> 0 Then Computerized Inventory System for Akihabara Store 92
txtSellPrice = rs!Price_Sell Else txtSellPrice = "" End If End Sub Private Sub txtSearch_Change() lv1.ListItems.clear 'If cboSearch = "" Or txtSearch = "" Then ' MsgBox "Please Fillup the Search by / type here" ' lblTotal = "" ' If cboSearch = "Item ID" Then lv1.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblStock where ID like '" & txtSearch & "%'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!Groups lblTotal = "Total Item is: " & " " & rs.RecordCount rs.MoveNext Loop Else MsgBox "Record Not Found", vbCritical, "Customer" txtSearch = "" txtSearch.SetFocus End If ' rs.Close ElseIf cboSearch = "Item Name" Then lv1.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblStock where ItemName like'" & txtSearch.text & "%'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!Groups lblTotal = "Total Item is: " & " " & rs.RecordCount rs.MoveNext Loop Else Computerized Inventory System for Akihabara Store 93
MsgBox "Record Not Found", vbCritical, "Customer" txtSearch = "" txtSearch.SetFocus End If 'rs.Close ElseIf cboSearch = "Item Group" Then lv1.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblStock where Groups like '" & txtSearch.text & "%'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!Groups lblTotal = "Total Item is: " & " " & rs.RecordCount rs.MoveNext Loop Else MsgBox "Record Not Found", vbCritical, "Customer" txtSearch = "" txtSearch.SetFocus End If ' rs.Close End If End Sub Private Sub txtSearch_Click() If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtuser rs!Level = frmMain.txtlevel rs!Access = "Item Sell Information" rs!Desc = "Text type" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Cancel Reservation Sub cbo() Computerized Inventory System for Akihabara Store 94
cboSearch.AddItem "First Name" cboSearch.AddItem "Last Name" End Sub Private Sub cboSearch_Click() txtSearch = "" txtSearch.SetFocus lv1.ListItems.clear lblCustomer = "" End Sub Private Sub cmdBack_Click() If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Cancel Downpayment " rs!Desc = "Back button" rs!Date = Date rs!Time = Time rs.Update rs.Close Unload Me frmMain.Show Call main(True) frmMain.Toolbar1.Visible = True End Sub Private Sub cmdCancel_Click() Do Until i = Text1 If rs.State = 1 Then rs.Close rs.Open "Select * from tblBalance where Name = '" & lv1.SelectedItem & "' and Date = '" & lv1.ListItems(1).SubItems(3) & "'", db txtName = rs!Name txtFName = rs!FName txtLName = rs!LName txtItem = rs!ItemName txtGroup = rs!itemGroup txtSold = rs!Itemqty txtID = rs!ItemID Computerized Inventory System for Akihabara Store 95
txtDate = rs!Date txtTime = rs!Time txtAdd = rs!Add txtPRice = rs!ActualPrice txtContact = rs!Contact txttotal1 = Val(rs!ActualPrice) * Val(rs!Itemqty) rs.Delete rs.Update If rs.State = 1 Then rs.Close rs.Open "Select * from tblBackPay", db rs.AddNew rs!Name = txtName rs!Add = txtAdd rs!Contact = txtContact rs!FName = txtFName rs!LName = txtLName rs!ItemID = txtID rs!ItemName = txtItem rs!itemGroup = txtGroup rs!Itemqty = txtSold rs!DateCancel = Date rs!DateReserve = txtDate rs!itemTotal = txttotal1 rs!ItemPrice = txtPRice rs!Time = Time rs!Transaction = "Down Payment" rs.Update rs.Close If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ItemName= '" & txtItem & "'", db rs!qty = Val(rs!qty) + Val(txtSold) rs.Update rs.Close i=i+1 Loop lv1.ListItems.clear cmdCancel.Enabled = False lbltotal = "" txtSearch = "" cboSearch.clear Call cbo
96
If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Cancel Downpayment" rs!Desc = "Cancel button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdSearch_Click() lblCustomer = "" lv1.ListItems.clear If cboSearch = "" Or txtSearch = "" Then MsgBox "Please Fill up the search by and textsearch" ElseIf cboSearch = "First Name" Then If rs.State = 1 Then rs.Close rs.Open "Select * from tblBalance where FName= '" & txtSearch & "' and Date = '" & DDate & "'", db If rs.RecordCount <> 0 Then cmdCancel.Enabled = True Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!Name) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!BalancePrice List.SubItems(3) = rs!Date Text1 = rs.RecordCount rs.MoveNext lv1.Enabled = True Loop If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(BalancePRice) AS Totals FROM tblBalance where FName= '" & txtSearch & "' and Date = '" & DDate & "'", db If rs!Totals = "" Then lbltotal = "0" Else lbltotal = "Balance Total is: " & " " & Format(rs!Totals, "#,###,###,###,###.00") Text2 = Format(rs!Totals, "#,###,###,###,###.00") Computerized Inventory System for Akihabara Store 97
End If Else MsgBox "Record Not Found", vbCritical, "Customer" txtSearch = "" txtSearch.SetFocus lblCustomer = "" End If rs.Close ElseIf cboSearch = "Last Name" Then If rs.State = 1 Then rs.Close rs.Open "Select * from tblBalance where LName= '" & txtSearch & "' and date = '" & DDate & "'", db If rs.RecordCount <> 0 Then cmdCancel.Enabled = True Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!Name) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!BalancePrice List.SubItems(3) = rs!Date Text1 = rs.RecordCount rs.MoveNext lv1.Enabled = True Loop If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(BalancePRice) AS Totals FROM tblBalance where LName= '" & txtSearch & "' and date = '" & DDate & "'", db If rs!Totals = "" Then lbltotal = "0" Else lbltotal = "Balance Total is: " & " " & Format(rs!Totals, "#,###,###,###,###.00") Text2 = Format(rs!Totals, "#,###,###,###,###.00") End If Else MsgBox "Record Not Found", vbCritical, "Customer" txtSearch = "" txtSearch.SetFocus lblCustomer = "" End If rs.Close End If If rs.State = 1 Then rs.Close Computerized Inventory System for Akihabara Store 98
rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Cancel Downpayment" rs!Desc = "Seach button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdSearchAll_Click() cboSearch.clear lblCustomer = "" lv1.ListItems.clear txtSearch = "" Call cbo cmdCancel.Enabled = False If rs.State = 1 Then rs.Close rs.Open "Select * from tblBalance", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!Name) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!BalancePrice List.SubItems(3) = rs!Date rs.MoveNext lv1.Enabled = True Loop End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Cancel Downpayment " rs!Desc = "Seach All button" rs!Date = Date rs!Time = Time rs.Update Computerized Inventory System for Akihabara Store 99
rs.Close End Sub Private Sub Form_Load() Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 Call opendb Call cbo cmdCancel.Enabled = False DDate = Date lbltotal = ""
If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Cancel Downpayment" rs!Desc = "Form Load" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Customer Balance Sub cbo() cboSearch.AddItem "First Name" cboSearch.AddItem "Last Name" End Sub Private Sub cboSearch_Click() txtSearch = "" txtSearch.SetFocus lv1.ListItems.clear lblCustomer = "" End Sub Computerized Inventory System for Akihabara Store 100
Private Sub cmdBack_Click() If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Balance Form " rs!Desc = "Back Button" rs!Date = Date rs!Time = Time rs.Update rs.Close Unload Me frmMain.Show Call main(True) frmMain.Toolbar1.Visible = True End Sub Private Sub cmdPay_Click() Frame1.Enabled = False Frame3.Visible = True txtTotal = Text2 End Sub Private Sub cmdpay2_Click() If (Val(txtBalance) > Val(txtCR)) Then MsgBox "too short" Else txtCC = Val(txtCR) - Val(txtTotal) Do Until i = Text1 If rs.State = 1 Then rs.Close rs.Open "Select * from tblBalance where Name = '" & lv1.SelectedItem & "' and Date = '" & lv1.ListItems(1).SubItems(3) & "'", db txtName = rs!Name txtFName = rs!FName txtLName = rs!LName txtAdd = rs!Add txtContact = rs!Contact txtItem = rs!ItemName txtGroup = rs!itemGroup txtSold = rs!Itemqty txtDate = rs!Date txtID = rs!ItemID txtPRice = rs!BalancePrice Computerized Inventory System for Akihabara Store 101
txtTime = rs!Time txttotal1 = Val(rs!ActualPrice) * Val(rs!Itemqty) rs.Delete rs.Update If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db rs.AddNew rs!Name = txtName rs!Add = txtAdd rs!Contact = txtContact rs!FName = txtFName rs!LName = txtLName rs!ItemID = txtID rs!ItemName = txtItem rs!ItemPrice = Format(txtPRice, "#,###,###,###,###.00") rs!itemGroup = txtGroup rs!Itemqty = txtSold rs!itemTotal = Format(Val(txtSold) * Val(txtPRice), "#,###,###,###,###.00") rs!Date = Date rs!ActualPrice = Format(rs!ActualPrice, "#,###,###,###,###.00") rs!Time = Time rs.Update rs.Close If rs.State = 1 Then rs.Close rs.Open "Select * from tblReserv", db rs.AddNew rs!Name = txtName rs!Add = txtAdd rs!Contact = txtContact rs!FName = txtFName rs!LName = txtLName rs!ItemID = txtID rs!ItemName = txtItem rs!itemGroup = txtGroup rs!Itemqty = txtSold rs!Date = Date rs!ItemPrice = Format(txttotal1, "#,###,###,###,###.00") rs!Time = Time rs.Update rs.Close If rs.State = 1 Then rs.Close Computerized Inventory System for Akihabara Store 102
rs.Open "Select * from tblPOS", db rs.AddNew rs!Name = txtName rs!FName = txtFName rs!LName = txtLName rs!ItemID = txtID rs!item = txtItem rs!itemGroup = txtGroup rs!Sold = txtSold rs!Date = Date rs!Total = Format(txttotal1, "#,###,###,###,###.00") rs!Time = Time rs.Update rs.Close i=i+1 Loop If DataEnvironment1.rsDummy.State = 1 Then DataEnvironment1.rsDummy.Close DataEnvironment1.rsDummy.Open "SELECT * From tblDummy " DBB.Sections("Section4").Controls("lblDate").Caption = Date DBB.Sections("Section4").Controls("LName").Caption = txtName DBB.Sections("Section4").Controls("LAdd").Caption = txtAdd DBB.Sections("Section4").Controls("LNo").Caption = txtContact ' DBB.Sections("Section5").Controls("totalBal").Caption = Format(txtTotal, "#,###,###,###,###.00") DBB.Sections("Section5").Controls("CR").Caption = Format(txtCR, "#,###,###,###,###.00") DBB.Sections("Section5").Controls("CC").Caption = Format(txtCC, "#,###,###,###,###.00") DBB.Show If rs.State = 1 Then rs.Close rs.Open "Delete * from tblDummy", db Frame3.Visible = False txtSearch = "" cmdPay.Enabled = False lv1.ListItems.clear lbltotal = "" Frame1.Enabled = True cboSearch.clear Call cbo End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew Computerized Inventory System for Akihabara Store 103
rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Balance Form " rs!Desc = "Pay Button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdSearch_Click() lblCustomer = "" lv1.ListItems.clear If cboSearch = "" Or txtSearch = "" Then MsgBox "Please Fill up the search by and textsearch" ElseIf cboSearch = "First Name" Then If rs.State = 1 Then rs.Close rs.Open "Select * from tblBalance where FName= '" & txtSearch & "' and date = '" & DTPicker1 & "'", db If rs.RecordCount <> 0 Then cmdPay.Enabled = True Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!Name) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!BalancePrice List.SubItems(3) = rs!Date txtFName = rs!FName Text1 = rs.RecordCount rs.MoveNext lv1.Enabled = True Loop If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(BalancePRice) AS Totals FROM tblBalance where FName= '" & txtSearch & "' and date = '" & DTPicker1 & "'", db If rs!Totals = "" Then lbltotal = "0" Else lbltotal = "Balance Total is: " & " " & Format(rs!Totals, "#,###,###,###,###.00") Text2 = Format(rs!Totals, "#,###,###,###,###.00") End If Else Computerized Inventory System for Akihabara Store 104
MsgBox "Record Not Found", vbCritical, "Customer" txtSearch = "" txtSearch.SetFocus lblCustomer = "" End If rs.Close ElseIf cboSearch = "Last Name" Then If rs.State = 1 Then rs.Close rs.Open "Select * from tblBalance where LName= '" & txtSearch & "' and date = '" & DTPicker1 & "'", db If rs.RecordCount <> 0 Then cmdPay.Enabled = True Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!Name) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!BalancePrice List.SubItems(3) = rs!Date txtFName = rs!FName Text1 = rs.RecordCount rs.MoveNext lv1.Enabled = True Loop If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(BalancePRice) AS Totals FROM tblBalance where LName= '" & txtSearch & "' and date = '" & DTPicker1 & "'", db If rs!Totals = "" Then lbltotal = "0" Else lbltotal = "Balance Total is: " & " " & Format(rs!Totals, "#,###,###,###,###.00") Text2 = Format(rs!Totals, "#,###,###,###,###.00") End If Else MsgBox "Record Not Found", vbCritical, "Customer" txtSearch = "" txtSearch.SetFocus lblCustomer = "" End If rs.Close End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew Computerized Inventory System for Akihabara Store 105
rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Balance Form " rs!Desc = "Search Button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdSearchAll_Click() cboSearch.clear lblCustomer = "" lv1.ListItems.clear txtSearch = "" Call cbo cmdPay.Enabled = False If rs.State = 1 Then rs.Close rs.Open "Select * from tblBalance", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!Name) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!BalancePrice List.SubItems(3) = rs!Date rs.MoveNext lv1.Enabled = True Loop End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Balance Form " rs!Desc = "Search All Button" rs!Date = Date rs!Time = Time rs.Update rs.Close Computerized Inventory System for Akihabara Store 106
End Sub Private Sub Form_Load() Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 Call opendb Call cbo DTPicker1 = Date lbltotal = "" cmdPay.Enabled = False lbltotal = ""
If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Balance Form " rs!Desc = "Form Load" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Customer Reservation Dim m, d, Y, f As String Sub frame(X As Integer) Frame1.Enabled = X Frame3.Enabled = X Frame4.Enabled = X Frame5.Enabled = X End Sub Sub cbo() cboSearch.AddItem "ID" cboSearch.AddItem "First Name" cboSearch.AddItem "Last Name" Computerized Inventory System for Akihabara Store 107
cbosearch2.AddItem "Item ID" cbosearch2.AddItem "Item Name" cbosearch2.AddItem "Item Group" End Sub Private Sub cmdAdd_Click() Command5.Enabled = True If rs.State = 1 Then rs.Close rs.Open "select * from tblDummy where itemname = '" & txtItemName & "'", db If rs.RecordCount <> 0 Then rick = rs!Itemqty ' jia = rs!itemprice If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ItemName = '" & txtItemName & "'", db If (Val(rs!qty) < Val(txtQty)) Then ' ' ' If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db If rs.RecordCount = 0 Then MsgBox "Cannot Process the Qty is to low" txtQty = "" ' Else ' txtQty = "" ' Frame5.Enabled = True ' End If ElseIf txtQty = "" Or txtQty = "0" Then MsgBox "Please Enter How many do you want to buy this Item", vbQuestion, "ADD" txtQty = "" txtQty.SetFocus Else cmdPayment.Enabled = True If rs.State = 1 Then rs.Close rs.Open "Select * from tblBalance where itemname = '" & txtItemName & "' and FName = '" & txtFName & "'", db rs!BalancePrice = Format(Val(txtPRice) * (Val(rick) + Val(txtQty)), "#,###,###,###,###.00") rs!ActualPrice = Format((Val(actual) + Val(actual)), "#,###,###,###,###.00") rs!Itemqty = Val(txtQty) + Val(rick) rs!Date = Date rs.Update rs.Close If rs.State = 1 Then rs.Close Computerized Inventory System for Akihabara Store 108
rs.Open "Select * from tblDummy where itemname = '" & txtItemName & "' and FName = '" & txtFName & "'", db rs!ItemPrice = Format(Val(txtPRice) * (Val(rick) + Val(txtQty)), "#,###,###,###,###.00") 'Format(txtPRice, "#,###,###,###,###.00") rs!Itemqty = Val(txtQty) + Val(rick) ' txtQty rs!itemTotal = Format((Val(rick) + Val(txtQty)) * Val(txtPRice), "#,###,###,###,###.00") rs!Date = Date rs!ActualPrice = Format(actual, "#,###,###,###,###.00") rs.Update rs.Close If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ItemName = '" & txtItemName & "'", db If rs.RecordCount <> 0 Then rs!qty = Val(rs!qty) - Val(txtQty) rs.Update rs.Close End If If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(ItemTotal) AS Totals FROM tblDummy", db If rs!Totals = "" Then lbltotal = "0" Else lbltotal = Format(rs!Totals, "#,###,###,###,###.00") End If lv2.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db Do While rs.EOF <> True Set List = lv2.ListItems.Add(, , rs!ItemID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!itemTotal List.SubItems(3) = rs!Time List.SubItems(4) = rs!Date List.SubItems(5) = rs!Itemqty Text1 = rs.RecordCount rs.MoveNext Loop rs.Close
109
If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(itemqty) as totalqty From tbldummy", db If rs.RecordCount <> 0 Then Label18 = rs!totalqty End If rs.Close Call frame(True) Frame1.Enabled = False cmdCancel.Enabled = False txtItemName = "" txtPRice = "" txtQty = "" txtCate = "" lv1.ListItems.clear lblItem = "" lv1.Enabled = False cmdAdd.Enabled = False If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Downpayment Transaction" rs!Desc = "Add button" rs!Date = Date rs!Time = Time rs.Update rs.Close End If Else
If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ItemName = '" & txtItemName & "'", db If (Val(rs!qty) < Val(txtQty)) Then ' ' ' If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db If rs.RecordCount = 0 Then 110
MsgBox "Cannot Process the Qty is to low" txtQty = "" ' Else ' txtQty = "" ' Frame5.Enabled = True ' End If ElseIf txtQty = "" Or txtQty = "0" Then MsgBox "Please Enter How many do you want to buy this Item", vbQuestion, "ADD" txtQty = "" txtQty.SetFocus Else cmdPayment.Enabled = True If rs.State = 1 Then rs.Close rs.Open "Select * from tblBalance", db rs.AddNew rs!Name = txtName rs!Add = txtAdd rs!Contact = txtContact rs!FName = txtFName rs!LName = txtLName rs!ItemID = txtID rs!ItemName = txtItemName rs!BalancePrice = Format(Val(txtPRice) * Val(txtQty), "#,###,###,###,###.00") rs!ActualPrice = Format(Val(actual) * Val(txtQty), "#,###,###,###,###.00") rs!itemGroup = txtCate rs!Itemqty = txtQty rs!Date = Date rs!Time = Time rs.Update rs.Close If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db rs.AddNew rs!Name = txtName rs!Add = txtAdd rs!Contact = txtContact rs!FName = txtFName rs!LName = txtLName rs!ItemID = txtID rs!ItemName = txtItemName rs!ItemPrice = Format(txtPRice, "#,###,###,###,###.00") rs!itemGroup = txtCate rs!Itemqty = txtQty Computerized Inventory System for Akihabara Store 111
rs!itemTotal = Format(Val(txtQty) * Val(txtPRice), "#,###,###,###,###.00") rs!Date = Date rs!ActualPrice = Format(Val(actual) * Val(txtQty), "#,###,###,###,###.00") rs!Time = Time rs.Update rs.Close If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ItemName = '" & txtItemName & "'", db If rs.RecordCount <> 0 Then rs!qty = Val(rs!qty) - Val(txtQty) rs.Update rs.Close End If If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(ItemTotal) AS Totals FROM tblDummy", db If rs!Totals = "" Then lbltotal = "0" Else lbltotal = Format(rs!Totals, "#,###,###,###,###.00") End If lv2.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db Do While rs.EOF <> True Set List = lv2.ListItems.Add(, , rs!ItemID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!itemTotal List.SubItems(3) = rs!Time List.SubItems(4) = rs!Date List.SubItems(5) = rs!Itemqty Text1 = rs.RecordCount rs.MoveNext Loop rs.Close If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(itemqty) as totalqty From tbldummy", db If rs.RecordCount <> 0 Then Label18 = rs!totalqty End If rs.Close Computerized Inventory System for Akihabara Store 112
Call frame(True) Frame1.Enabled = False cmdCancel.Enabled = False txtItemName = "" txtPRice = "" txtQty = "" txtCate = "" lv1.ListItems.clear lblItem = "" lv1.Enabled = False cmdAdd.Enabled = False If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Downpayment Transaction" rs!Desc = "Add button" rs!Date = Date rs!Time = Time rs.Update rs.Close End If End If End Sub Private Sub cmdBack_Click() labas = "Downpayment Transaction" Call opendb Unload Me frmMain.Show Call main(True) frmMain.Toolbar1.Visible = True End Sub Private Sub cmdCancel_Click() Call frame(False) Frame1.Enabled = True txtName = "" Computerized Inventory System for Akihabara Store 113
txtAdd = "" txtContact = "" lv.ListItems.clear lblCustomer = "" txtSearch = "" cboSearch.clear Call cbo lv1.ListItems.clear lblItem = "" txtItem = "" txtItemName = "" txtPRice = "" txtCate = "" txtQty = "" lv.Enabled = False If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Downpayment Transaction" rs!Desc = "Cancel button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdDiscount_Click() cmdDiscount.Enabled = False txtDiscount.Enabled = False txtTotal = Val(txtTotal) - Val(txtDiscount) Command1.Enabled = True If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Downpayment Transaction" rs!Desc = "Discount button" rs!Date = Date rs!Time = Time rs.Update Computerized Inventory System for Akihabara Store 114
rs.Close End Sub Private Sub cmdpay2_Click() If (Val(txtTotal) > Val(txtCR)) Then MsgBox "too short" txtCR = "" txtCR.SetFocus Else txtCC = Val(txtCR) - Val(txtTotal) txtprocess = "Full Payed" Command1.Enabled = True If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Downpayment Transaction" rs!Desc = "Pay button" rs!Date = Date rs!Time = Time rs.Update rs.Close End If End Sub Private Sub cmdPayment_Click() Call frame(False) Frame6.Visible = True txtTotal = Format(lbltotal, "########00") lblbalance = Val(txtTotal) Command1.Enabled = False End Sub Private Sub cmdSearch1_Click() lv.ListItems.clear txtSearch = "" cboSearch.clear cbosearch2.clear lv.Enabled = True If rs.State = 1 Then rs.Close rs.Open "Select * from tblCustomer ", db If rs.RecordCount <> 0 Then Computerized Inventory System for Akihabara Store 115
Do While rs.EOF <> True Set List = lv.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!Name List.SubItems(2) = rs!Add lblCustomer = "Total Customer is: " & " " & rs.RecordCount rs.MoveNext lv1.Enabled = True Loop End If Call cbo If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Downpayment Transaction" rs!Desc = "Search All Customer button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdsearch3_Click() lv1.ListItems.clear lv.ListItems.clear lblCustomer = "" txtItem = "" lv1.Enabled = True If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem ", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!Groups List.SubItems(3) = rs!Price_Sell List.SubItems(4) = rs!qty lblItem = "Total Item is: " & " " & rs.RecordCount rs.MoveNext Loop End If If rs.State = 1 Then rs.Close Computerized Inventory System for Akihabara Store 116
rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Downpayment Transaction" rs!Desc = "Search All Item button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub Command1_Click() If DataEnvironment1.rsDummy.State = 1 Then DataEnvironment1.rsDummy.Close DataEnvironment1.rsDummy.Open "SELECT * From tblDummy" DRD.Sections("Section4").Controls("lblDate").Caption = Date DRD.Sections("Section4").Controls("LName").Caption = txtName DRD.Sections("Section4").Controls("LAdd").Caption = txtAdd DRD.Sections("Section4").Controls("LNo").Caption = txtContact DRD.Sections("Section5").Controls("totalP").Caption = Format(txtTotal, "#,###,###,###,###.00") DRD.Sections("Section5").Controls("CR").Caption = Format(txtCR, "#,###,###,###,###.00") DRD.Sections("Section5").Controls("CC").Caption = Format(txtCC, "#,###,###,###,###.00") DRD.Sections("Section5").Controls("balance").Caption = Format(lblbalance, "#,###,###,###,###.00") DRD.Sections("Section5").Controls("Discount").Caption = Format(txtDiscount, "#,###,###,###,###.00") DRD.Show If rs.State = 1 Then rs.Close rs.Open "Delete * from tblDummy", db txtTotal = "" txtCR = "" txtCC = "" txtdown = "" Frame6.Visible = False lv2.ListItems.clear txtName = "" txtAdd = "" txtBal = "" lbltotal = "" txtContact = "" Call frame(False) Frame1.Enabled = True cmdCancel.Enabled = True Computerized Inventory System for Akihabara Store 117
cmdDiscount.Enabled = True txtDiscount.Enabled = True If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Downpayment Transaction" rs!Desc = "Print button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub Command2_Click() Frame1.Enabled = False cmdCancel.Enabled = False txtItemName = "" txtPRice = "" txtQty = "" txtCate = "" lv1.ListItems.clear lblItem = "" lv1.Enabled = False cmdAdd.Enabled = False Frame6.Visible = False Frame5.Enabled = True Frame3.Enabled = True End Sub Private Sub Command3_Click() If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy where ItemID = '" & lblID & "' and Date = '" & Label22 & "'", db item = rs!ItemName If txtDqty = "0" Or txtDqty = "" Then txtDqty = "" MsgBox "Please enter how many do u want do delete" Computerized Inventory System for Akihabara Store 118
ElseIf Val(txtDqty) > Val(rs!Itemqty) Then MsgBox "out of range" txtDqty = "" ElseIf Val(txtDqty) = Val(rs!Itemqty) Then If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy where ItemID = '" & lblID & "' and Date = '" & Label22 & "'", db rs.Delete rs.Update rs.Close If rs.State = 1 Then rs.Close rs.Open "Select * from tblBalance where name = '" & txtName & "' and ItemID = '" & lblID & "'and Date = '" & Label22 & "'", db rs.Delete rs.Update rs.Close
' If rs.State = 1 Then rs.Close ' rs.Open "SELECT SUM(itemqty) as totalqty From tbldummy", db ' If rs.RecordCount = 0 Then ' Label18 = rs!totalqty ' Else ' Label18 = "" ' End If ' rs.Close If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ItemName= '" & item & "'", db rs!qty = Val(rs!qty) + Val(txtDqty) rs.Update rs.Close lv2.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db If rs.RecordCount = 0 Then cmdCancel.Enabled = True lbltotal = "" cmdPayment.Enabled = False Computerized Inventory System for Akihabara Store 119
Frame4.Enabled = False Frame5.Enabled = False Label18 = "" Else If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(ItemTotal) AS Totals FROM tblDummy", db lbltotal = Format(rs!Totals, "#,###,###,###,###.00") rs.Close End If If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db Do While rs.EOF <> True Set List = lv2.ListItems.Add(, , rs!ItemID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!itemTotal List.SubItems(3) = rs!Time List.SubItems(4) = rs!Date List.SubItems(5) = rs!Itemqty ' Label18 = rs.RecordCount rs.MoveNext Loop rs.Close If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(itemqty) as totalqty From tbldummy", db If rs.RecordCount = 0 Then Label18 = rs!totalqty Else Label18 = "" End If rs.Close Frame8.Visible = False Frame5.Enabled = True txtDqty = ""
If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy where ItemID = '" & lblID & "' and Date = '" & Label22 & "'", db If rs.RecordCount <> 0 Then item = rs!ItemName jinky = rs!ItemPrice tom = rs!itemTotal nash = rs!ActualPrice jia = Val(rs!Itemqty) - Val(txtDqty) wa = Val(rs!itemTotal) / Val(rs!Itemqty) outs = Val(Label24) * Val(txtDqty) rs!itemTotal = Val(rs!itemTotal) - Val(wa) v = Val(rs!itemTotal) - Val(wa) rs!Itemqty = Val(rs!Itemqty) - Val(txtDqty) rs!ActualPrice = Val(nash) - Val(outs) rs.Update rs.Close If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ItemName= '" & item & "'", db rs!qty = Val(rs!qty) + Val(txtDqty) rs.Update rs.Close End If If rs.State = 1 Then rs.Close rs.Open "Select * from tblBalance where name = '" & txtName & "' and ItemID = '" & lblID & "'and Date = '" & Label22 & "'", db rs!BalancePrice = Val(rs!BalancePrice) - Val(v) rs!Itemqty = Val(rs!Itemqty) - Val(txtDqty) rs!ActualPrice = Val(nash) - Val(outs) rs.Update rs.Close lv2.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db If rs.RecordCount = 0 Then Computerized Inventory System for Akihabara Store 121
cmdCancel.Enabled = True lbltotal = "" cmdPayment.Enabled = False Frame4.Enabled = False Frame5.Enabled = False Label18 = "" Else If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(ItemTotal) AS Totals FROM tblDummy", db lbltotal = Format(rs!Totals, "#,###,###,###,###.00") rs.Close End If If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db Do While rs.EOF <> True Set List = lv2.ListItems.Add(, , rs!ItemID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!itemTotal List.SubItems(3) = rs!Time List.SubItems(4) = rs!Date List.SubItems(5) = rs!Itemqty ' Label18 = rs.RecordCount rs.MoveNext Loop rs.Close If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(itemqty) as totalqty From tbldummy", db If rs.RecordCount = 0 Then Label18 = "" Else Label18 = rs!totalqty End If rs.Close If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Downpayment Transaction" Computerized Inventory System for Akihabara Store 122
rs!Desc = "Delete button" rs!Date = Date rs!Time = Time rs.Update rs.Close Frame8.Visible = False Frame5.Enabled = True txtDqty = "" End If End Sub Private Sub Command4_Click() Frame8.Visible = False Frame5.Enabled = True Frame4.Enabled = True End Sub Private Sub Command5_Click() Do Until i = Text1 If rs.State = 1 Then rs.Close rs.Open "Select * from tbldummy where Name = '" & txtName & "' and Date = '" & Date & "'", db txtitem1 = rs!ItemName txtSold = rs!Itemqty rs.Delete rs.Update If rs.State = 1 Then rs.Close rs.Open "Select * from tblBalance where Name = '" & txtName & "' and Date = '" & Date & "'", db rs.Delete rs.Update If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ItemName= '" & txtitem1 & "'", db rs!qty = Val(rs!qty) + Val(txtSold) rs.Update rs.Close i=i+1 Loop lv2.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db If rs.RecordCount = 0 Then cmdCancel.Enabled = True Computerized Inventory System for Akihabara Store 123
lbltotal = "" cmdPayment.Enabled = False Frame4.Enabled = False Frame5.Enabled = False Label18 = "" Else If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(ItemTotal) AS Totals FROM tblDummy", db lbltotal = Format(rs!Totals, "#,###,###,###,###.00") rs.Close End If If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db Do While rs.EOF <> True Set List = lv2.ListItems.Add(, , rs!ItemID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!itemTotal List.SubItems(3) = rs!Time List.SubItems(4) = rs!Date List.SubItems(5) = rs!Itemqty ' Label18 = rs.RecordCount rs.MoveNext Loop rs.Close If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(itemqty) as totalqty From tbldummy", db If rs.RecordCount = 0 Then Label18 = rs!totalqty Else Label18 = "" End If rs.Close
124
Command5.Enabled = False If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Cancel Downpayment " rs!Desc = "Cancel button" & Chr(32) & txtName rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub Form_Load() m = Format(Date, "M") d = Format(Date, "DD") Y = Format(Date, "YYYY") f = m & "/" & d & "/" & Y Frame8.Visible = False Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 Call opendb Command5.Enabled = False Call cbo lv.Enabled = False lbltotal = "" lblItem = "" lblCustomer = "" cmdPayment.Enabled = False Frame3.Enabled = False Frame4.Enabled = False If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Downpayment Transaction" rs!Desc = "Form Load" rs!Date = Date Computerized Inventory System for Akihabara Store 125
rs!Time = Time rs.Update rs.Close End Sub Private Sub lv_DblClick() Call frame(False) Frame3.Enabled = True If rs.State = 1 Then rs.Close rs.Open "Select * from tblCustomer where ID='" & lv.SelectedItem & "'", db If rs.RecordCount <> 0 Then a = Format(rs!Birthday, "MM") b = Format(rs!Birthday, "DD") c = Format(Date, "MM") d = Format(Date, "DD") If a & b = c & d Then Label14.Visible = True txtDiscount.Visible = True cmdDiscount.Visible = True DRD.Sections("Section5").Controls("Discount").Visible = True DRD.Sections("Section5").Controls("label12").Visible = True Command1.Enabled = False Else Label14.Visible = False txtDiscount.Visible = False cmdDiscount.Visible = False DRD.Sections("Section5").Controls("Discount").Visible = False DRD.Sections("Section5").Controls("label12").Visible = False Command1.Enabled = True End If txtName = rs!Name txtAdd = rs!Add txtContact = rs!ContactNo txtFName = rs!FName txtLName = rs!LName Else End If rs.Close End Sub Private Sub lv1_DblClick() Call frame(False) Frame4.Enabled = True Computerized Inventory System for Akihabara Store 126
cmdAdd.Enabled = True Frame3.Enabled = True If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ID='" & lv1.SelectedItem & "'", db If rs.RecordCount <> 0 Then txtItemName = rs!ItemName txtPRice = Val(rs!Price_Sell) / 2 actual = rs!Price_Sell txtCate = rs!Groups Label24 = rs!Price_Sell txtID = rs!ID End If rs.Close End Sub Private Sub lv2_DblClick() If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy where ItemID = '" & lv2.SelectedItem & "' and Date = '" & lv2.ListItems(1).SubItems(4) & "'", db If rs.RecordCount <> 0 Then lblID = rs!ItemID lblName = rs!ItemName lblQty = rs!Itemqty Label22 = lv2.ListItems(1).SubItems(4) End If Frame8.Visible = True Frame5.Enabled = False Frame4.Enabled = False End Sub Private Sub txtItem_Change() lv1.ListItems.clear lv1.Enabled = True lblItem = "" lblCustomer = "" lv.ListItems.clear lv1.Enabled = True 'If cboSearch2 = "" Or txtItem = "" Then ' MsgBox "Please Fill up the Categories / Item Name" Computerized Inventory System for Akihabara Store 127
If cbosearch2 = "Item ID" Then lv1.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ID like'" & txtItem & "%'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!Groups List.SubItems(3) = rs!Price_Sell List.SubItems(4) = rs!qty lblItem = "Total Item is: " & " " & rs.RecordCount rs.MoveNext Loop Else MsgBox "Record Not Found", vbCritical, "Customer" txtItem = "" txtItem.SetFocus End If ' rs.Close ElseIf cbosearch2 = "Item Name" Then lv1.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ItemName like'" & txtItem & "%'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!Groups List.SubItems(3) = rs!Price_Sell List.SubItems(4) = rs!qty lblItem = "Total Item is: " & " " & rs.RecordCount rs.MoveNext Loop Else MsgBox "Record Not Found", vbCritical, "Customer" txtItem = "" txtItem.SetFocus End If 'rs.Close ElseIf cbosearch2 = "Item Group" Then lv1.ListItems.clear If rs.State = 1 Then rs.Close Computerized Inventory System for Akihabara Store 128
rs.Open "Select * from tblItem where Groups like '" & txtItem & "%'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!Groups List.SubItems(3) = rs!Price_Sell List.SubItems(4) = rs!qty lblItem = "Total Item is: " & " " & rs.RecordCount rs.MoveNext Loop Else MsgBox "Record Not Found", vbCritical, "Customer" txtItem = "" txtItem.SetFocus End If ' rs.Close End If End Sub Private Sub txtItem_Click() If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Downpayment Transaction" rs!Desc = "Type Item Search" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub txtSearch_Change() lv.ListItems.clear lv.Enabled = True lblCustomer = "" 'If cboSearch = "" Or txtSearch = "" Then ' MsgBox "Please Fillup the Search by / type here" If cboSearch = "ID" Then lv.ListItems.clear Computerized Inventory System for Akihabara Store 129
If rs.State = 1 Then rs.Close rs.Open "Select * from tblCustomer where ID like'" & txtSearch & "%'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!Name List.SubItems(2) = rs!Add lblCustomer = "Total Customer is: " & " " & rs.RecordCount rs.MoveNext Loop Else MsgBox "Record Not Found", vbCritical, "Customer" txtSearch = "" txtSearch.SetFocus End If ' rs.Close ElseIf cboSearch = "First Name" Then lv.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblCustomer where FName like'" & txtSearch.text & "%'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!Name List.SubItems(2) = rs!Add lblCustomer = "Total Customer is: " & " " & rs.RecordCount rs.MoveNext Loop Else MsgBox "Record Not Found", vbCritical, "Customer" txtSearch = "" txtSearch.SetFocus End If ' rs.Close ElseIf cboSearch = "Last Name" Then lv.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblCustomer where LName like'" & txtSearch.text & "%'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!Name List.SubItems(2) = rs!Add Computerized Inventory System for Akihabara Store 130
lblCustomer = "Total Customer is: " & " " & rs.RecordCount rs.MoveNext Loop Else MsgBox "Record Not Found", vbCritical, "Customer" txtSearch = "" txtSearch.SetFocus End If ' rs.Close End If End Sub Customer Sale Dim m, d, Y, f As String Sub frame(X As Integer) Frame1.Enabled = X Frame3.Enabled = X 'Frame4.Enabled = X Frame5.Enabled = X End Sub Sub cbo() cboSearch.AddItem "ID" cboSearch.AddItem "First Name" cboSearch.AddItem "Last Name" cbosearch2.AddItem "Item ID" cbosearch2.AddItem "Item Name" cbosearch2.AddItem "Item Group" End Sub Private Sub cmdAdd_Click() If rs.State = 1 Then rs.Close rs.Open "select * from tblDummy where itemname = '" & txtItemName & "'", db If rs.RecordCount <> 0 Then rick = rs!Itemqty If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ItemName = '" & txtItemName & "'", db If (Val(rs!qty) < Val(txtQty)) Then MsgBox "Cannot Process the Qty is to low" txtQty = "" ElseIf txtQty = "" Or txtQty = "0" Then Computerized Inventory System for Akihabara Store 131
MsgBox "Please Enter How many do you want to buy this Item", vbQuestion, "ADD" txtQty = "" txtQty.SetFocus Else cmdPayment.Enabled = True ' If rs.State = 1 Then rs.Close ' rs.Open "Select * from tblReserv where FName= '" & txtFName & "' and itemname = '" & txtItemName & "' and Date = '" & f & "'", db ' rs!Itemqty = Val(rs!Itemqty) + Val(txtQty) ' rs!ItemPrice = Val(rs!ItemPrice) + (Val(txtQty) * Val(txtPRice)) ' rs!Date = Date ' rs.Update ' rs.Close If rs.State = 1 Then rs.Close rs.Open "Select * from tblPOS where item = '" & txtItemName & "' and FName = '" & txtFName & "'", db rs!Sold = Val(txtQty) + Val(rs!Sold) rs!Date = Date rs!Total = Val(rs!Total) + (Val(txtQty) * Val(txtPRice)) rs.Update rs.Close If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy where itemname = '" & txtItemName & "' and FName = '" & txtFName & "'", db rs!ItemPrice = Format(Val(txtPRice) * (Val(rick) + Val(txtQty)), "#,###,###,###,###.00") 'Format(txtPRice, "#,###,###,###,###.00") rs!Itemqty = Val(txtQty) + Val(rick) ' txtQty rs!itemTotal = Format((Val(rick) + Val(txtQty)) * Val(txtPRice), "#,###,###,###,###.00") rs!Date = Date rs!ActualPrice = Format(actual, "#,###,###,###,###.00") rs.Update rs.Close If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ItemName = '" & txtItemName & "'", db If rs.RecordCount <> 0 Then rs!qty = Val(rs!qty) - Val(txtQty) rs.Update rs.Close End If If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(ItemTotal) AS Totals FROM tblDummy", db Computerized Inventory System for Akihabara Store 132
If rs!Totals = "" Then lbltotal = "0" Else lbltotal = Format(rs!Totals, "#,###,###,###,###.00") End If lv2.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db Do While rs.EOF <> True Set List = lv2.ListItems.Add(, , rs!ItemID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!itemTotal List.SubItems(3) = rs!Time List.SubItems(4) = rs!Date Text1 = rs.RecordCount List.SubItems(5) = rs!Itemqty Label18 = rs.RecordCount rs.MoveNext Loop rs.Close Call frame(True) Frame1.Enabled = False cmdCancel.Enabled = False txtItemName = "" txtPRice = "" txtQty = "" txtCate = "" lv1.ListItems.clear lblItem = "" lv1.Enabled = False lv2.Enabled = True cmdAdd.Enabled = False End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Full Payment Transaction" rs!Desc = "Add button" rs!Date = Date Computerized Inventory System for Akihabara Store 133
rs!Time = Time rs.Update rs.Close Else If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ItemName = '" & txtItemName & "'", db If (Val(rs!qty) < Val(txtQty)) Then ' ' If rs.State = 1 Then rs.Close ' rs.Open "Select * from tblDummy", db ' If rs.RecordCount = 0 Then MsgBox "Cannot Process the Qty is to low" txtQty = "" ' Else ' txtQty = "" ' Frame5.Enabled = True ' End If ElseIf txtQty = "" Or txtQty = "0" Then MsgBox "Please Enter How many do you want to buy this Item", vbQuestion, "ADD" txtQty = "" txtQty.SetFocus Else cmdPayment.Enabled = True ' If rs.State = 1 Then rs.Close ' rs.Open "Select * from tblReserv", db ' rs.AddNew ' rs!Name = txtName ' rs!Add = txtAdd ' rs!Contact = txtContact ' rs!FName = txtFName ' rs!LName = txtLName ' rs!ItemID = txtID ' rs!ItemName = txtItemName ' rs!itemGroup = txtCate ' rs!Itemqty = txtQty ' rs!ItemPrice = txtPRice ' rs!Date = Date ' rs!Time = Time ' rs.Update ' rs.Close Computerized Inventory System for Akihabara Store 134
If rs.State = 1 Then rs.Close rs.Open "Select * from tblPOS", db rs.AddNew rs!Name = txtName rs!FName = txtFName rs!LName = txtLName rs!ItemID = txtID rs!item = txtItemName rs!itemGroup = txtCate rs!Sold = txtQty rs!Date = Date rs!Total = Val(txtQty) * Val(txtPRice) rs!Time = Time rs.Update rs.Close If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db rs.AddNew rs!Name = txtName rs!Add = txtAdd rs!Contact = txtContact rs!FName = txtFName rs!LName = txtLName rs!ItemID = txtID rs!ItemName = txtItemName rs!ItemPrice = txtPRice rs!itemGroup = txtCate rs!Itemqty = txtQty rs!itemTotal = Val(txtQty) * Val(txtPRice) rs!Date = Date rs!Time = Time rs!ActualPrice = txtPRice rs.Update rs.Close If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ItemName = '" & txtItemName & "'", db If rs.RecordCount <> 0 Then rs!qty = Val(rs!qty) - Val(txtQty) rs.Update rs.Close End If If rs.State = 1 Then rs.Close Computerized Inventory System for Akihabara Store 135
rs.Open "SELECT SUM(ItemTotal) AS Totals FROM tblDummy", db If rs!Totals = "" Then lbltotal = "0" Else lbltotal = Format(rs!Totals, "#,###,###,###,###.00") End If lv2.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db Do While rs.EOF <> True Set List = lv2.ListItems.Add(, , rs!ItemID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!itemTotal List.SubItems(3) = rs!Time List.SubItems(4) = rs!Date List.SubItems(5) = rs!Itemqty Text1 = rs.RecordCount Label18 = rs.RecordCount rs.MoveNext Loop rs.Close Call frame(True) Frame1.Enabled = False cmdCancel.Enabled = False txtItemName = "" txtPRice = "" txtQty = "" txtCate = "" lv1.ListItems.clear lblItem = "" lv1.Enabled = False lv2.Enabled = True cmdAdd.Enabled = False End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Full Payment Transaction" rs!Desc = "Add button" Computerized Inventory System for Akihabara Store 136
rs!Date = Date rs!Time = Time rs.Update rs.Close End If End Sub Private Sub cmdBack_Click() labas = "Full Payment Transaction" 'Call sarado Unload Me frmMain.Show Call main(True) frmMain.Toolbar1.Visible = True End Sub Private Sub cmdCancel_Click() Call frame(False) Frame1.Enabled = True txtName = "" txtAdd = "" txtContact = "" lv.ListItems.clear lblCustomer = "" txtSearch = "" cboSearch.clear Call cbo lv1.ListItems.clear lblItem = "" txtItem = "" txtItemName = "" txtPRice = "" txtCate = "" txtQty = "" lv.Enabled = False If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel Computerized Inventory System for Akihabara Store 137
rs!Access = "Full Payment Transaction" rs!Desc = "Cancel button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdDiscount_Click() txtTotal = Val(txtTotal) - Val(txtDiscount) Command1.Enabled = True If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Full Payment Transaction" rs!Desc = "Discount button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdPayment_Click() Call frame(False) Frame6.Visible = True txtTotal = Format(lbltotal, "########00") Command1.Enabled = False End Sub Private Sub cmdSearch1_Click() lv.ListItems.clear txtSearch = "" cboSearch.clear cbosearch2.clear lv.Enabled = True If rs.State = 1 Then rs.Close rs.Open "Select * from tblCustomer ", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv.ListItems.Add(, , rs!ID) Computerized Inventory System for Akihabara Store 138
List.SubItems(1) = rs!Name List.SubItems(2) = rs!Add lblCustomer = "Total Customer is: " & " " & rs.RecordCount rs.MoveNext Loop End If Call cbo If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Full Payment Transaction" rs!Desc = "Search All Customer button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdsearch3_Click() lv1.ListItems.clear lblItem = "" If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem ", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!Groups List.SubItems(3) = rs!Price_Sell List.SubItems(4) = rs!qty lblItem = "Total Item is: " & " " & rs.RecordCount rs.MoveNext lv1.Enabled = True Loop End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew Computerized Inventory System for Akihabara Store 139
rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Full Payment Transaction" rs!Desc = "Search All Item button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub Command1_Click() If DataEnvironment1.rsDummy.State = 1 Then DataEnvironment1.rsDummy.Close DataEnvironment1.rsDummy.Open "SELECT * From tblDummy" DRP.Sections("Section5").Controls("lblTotal").Caption = Format(txtTotal, "#,###,###,###,###.00") DRP.Sections("Section5").Controls("CR").Caption = Format(txtCR, "#,###,###,###,###.00") DRP.Sections("Section4").Controls("lblDate").Caption = Date DRP.Sections("Section4").Controls("LName").Caption = txtName DRP.Sections("Section4").Controls("LAdd").Caption = txtAdd DRP.Sections("Section4").Controls("LNo").Caption = txtContact DRP.Sections("Section5").Controls("CC").Caption = Format(txtCC, "#,###,###,###,###.00") DRP.Sections("Section5").Controls("Discount").Caption = Format(txtDiscount, "#,###,###,###,###.00") DRP.Show If rs.State = 1 Then rs.Close rs.Open "Delete * from tblDummy", db txtTotal = "" txtCR = "" txtCC = "" Frame6.Visible = False lv2.ListItems.clear txtName = "" txtAdd = "" txtContact = "" Call frame(False) Frame1.Enabled = True cmdCancel.Enabled = True lbltotal = "" If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew Computerized Inventory System for Akihabara Store 140
rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Full Payment Transaction" rs!Desc = "Print button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub Command2_Click() If (Val(txtTotal) > Val(txtCR)) Then MsgBox "too short" txtCR = "" txtCR.SetFocus Else txtCC = Val(txtCR) - Val(txtTotal) txtprocess = "Full Payed" Command1.Enabled = True If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Full Payment Transaction" rs!Desc = "Pay button" rs!Date = Date rs!Time = Time rs.Update rs.Close End If End Sub Private Sub Command3_Click() Frame1.Enabled = False cmdCancel.Enabled = False txtItemName = "" txtPRice = "" txtQty = "" txtCate = "" lv1.ListItems.clear lblItem = "" Computerized Inventory System for Akihabara Store 141
lv1.Enabled = False cmdAdd.Enabled = False Frame6.Visible = False Frame5.Enabled = True Frame3.Enabled = True End Sub Private Sub Command4_Click() Frame8.Visible = False Frame5.Enabled = True 'Frame4.Enabled = True End Sub Private Sub Command5_Click() If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy where ItemID = '" & lblID & "' and Date = '" & Label22 & "'", db item = rs!ItemName If txtDqty = "0" Or txtDqty = "" Then txtDqty = "" MsgBox "Please enter how many do u want do delete" ElseIf Val(txtDqty) > Val(rs!Itemqty) Then MsgBox "out of range" txtDqty = "" ElseIf Val(txtDqty) = Val(rs!Itemqty) Then If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy where ItemID = '" & lblID & "' and Date = '" & Label22 & "'", db rs.Delete rs.Update rs.Close If rs.State = 1 Then rs.Close rs.Open "Select * from tblPOS where name = '" & txtName & "' and ItemID = '" & lblID & "'and Date = '" & Label22 & "'", db rs.Delete rs.Update rs.Close
' If rs.State = 1 Then rs.Close Computerized Inventory System for Akihabara Store 142
' rs.Open "SELECT SUM(itemqty) as totalqty From tbldummy", db ' If rs.RecordCount = 0 Then ' Label18 = rs!totalqty ' Else ' Label18 = "" ' End If ' rs.Close If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ItemName= '" & item & "'", db rs!qty = Val(rs!qty) + Val(txtDqty) rs.Update rs.Close lv2.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db If rs.RecordCount = 0 Then cmdCancel.Enabled = True lbltotal = "" cmdPayment.Enabled = False ' Frame4.Enabled = False Frame5.Enabled = False Label18 = "" Else If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(ItemTotal) AS Totals FROM tblDummy", db lbltotal = Format(rs!Totals, "#,###,###,###,###.00") rs.Close End If If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db Do While rs.EOF <> True Set List = lv2.ListItems.Add(, , rs!ItemID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!itemTotal List.SubItems(3) = rs!Time List.SubItems(4) = rs!Date List.SubItems(5) = rs!Itemqty ' Label18 = rs.RecordCount Computerized Inventory System for Akihabara Store 143
rs.MoveNext Loop rs.Close If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(itemqty) as totalqty From tbldummy", db If rs.RecordCount = 0 Then Label18 = rs!totalqty Else Label18 = "" End If rs.Close Frame8.Visible = False Frame5.Enabled = True txtDqty = ""
Else If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy where ItemID = '" & lblID & "' and Date = '" & Label22 & "'", db If rs.RecordCount <> 0 Then item = rs!ItemName nash = rs!ItemPrice rs!Itemqty = Val(rs!Itemqty) - Val(txtDqty) rs!itemTotal = Val(rs!ItemPrice) * Val(rs!Itemqty) rs!ActualPrice = rs!itemTotal rs.Update rs.Close If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ItemName= '" & item & "'", db rs!qty = Val(rs!qty) + Val(txtDqty) rs.Update rs.Close End If If rs.State = 1 Then rs.Close rs.Open "Select * from tblPOS where name = '" & txtName & "' and ItemID = '" & lblID & "'and Date = '" & Label22 & "'", db Computerized Inventory System for Akihabara Store 144
rs!Sold = Val(rs!Sold) - Val(txtDqty) rs!Total = (Val(nash) * Val(rs!Sold)) rs.Update rs.Close lv2.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db If rs.RecordCount = 0 Then cmdCancel.Enabled = True lbltotal = "" cmdPayment.Enabled = False Frame4.Enabled = False Frame5.Enabled = False Label18 = "" Else If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(ItemTotal) AS Totals FROM tblDummy", db lbltotal = Format(rs!Totals, "#,###,###,###,###.00") rs.Close End If If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db Do While rs.EOF <> True Set List = lv2.ListItems.Add(, , rs!ItemID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!itemTotal List.SubItems(3) = rs!Time List.SubItems(4) = rs!Date List.SubItems(5) = rs!Itemqty ' Label18 = rs.RecordCount rs.MoveNext Loop rs.Close If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(itemqty) as totalqty From tbldummy", db If rs.RecordCount = 0 Then Computerized Inventory System for Akihabara Store 145
Label18 = "" Else Label18 = rs!totalqty End If rs.Close If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Downpayment Transaction" rs!Desc = "Delete button" rs!Date = Date rs!Time = Time rs.Update rs.Close Frame8.Visible = False Frame5.Enabled = True txtDqty = "" End If End Sub Private Sub Command6_Click() Do Until i = Text1 If rs.State = 1 Then rs.Close rs.Open "Select * from tbldummy where Name = '" & txtName & "' and Date = '" & Date & "'", db txtitem1 = rs!ItemName txtSold = rs!Itemqty rs.Delete rs.Update If rs.State = 1 Then rs.Close rs.Open "Select * from tblpos where Name = '" & txtName & "' and Date = '" & Date & "'", db rs.Delete rs.Update If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ItemName= '" & txtitem1 & "'", db rs!qty = Val(rs!qty) + Val(txtSold) rs.Update rs.Close i=i+1 Computerized Inventory System for Akihabara Store 146
Loop lv2.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db If rs.RecordCount = 0 Then cmdCancel.Enabled = True lbltotal = "" cmdPayment.Enabled = False ' Frame4.Enabled = False Frame5.Enabled = False Label18 = "" Else If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(ItemTotal) AS Totals FROM tblDummy", db lbltotal = Format(rs!Totals, "#,###,###,###,###.00") rs.Close End If If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db Do While rs.EOF <> True Set List = lv2.ListItems.Add(, , rs!ItemID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!itemTotal List.SubItems(3) = rs!Time List.SubItems(4) = rs!Date List.SubItems(5) = rs!Itemqty ' Label18 = rs.RecordCount rs.MoveNext Loop rs.Close If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(itemqty) as totalqty From tbldummy", db If rs.RecordCount = 0 Then Label18 = rs!totalqty Else Label18 = "" End If rs.Close Computerized Inventory System for Akihabara Store 147
Command6.Enabled = False If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Cancel Downpayment " rs!Desc = "Cancel button" & Chr(32) & txtName rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub Form_Load() m = Format(Date, "M") d = Format(Date, "DD") Y = Format(Date, "YYYY") f = m & "/" & d & "/" & Y Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 Call opendb Frame8.Visible = False lv.Enabled = False lbltotal = "" lblItem = "" lblCustomer = "" cmdPayment.Enabled = False lv1.Enabled = False lv2.Enabled = False
If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew Computerized Inventory System for Akihabara Store 148
rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Full Payment Transaction" rs!Desc = "Form Load" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub
Private Sub lv_DblClick() Call frame(False) Frame3.Enabled = True If rs.State = 1 Then rs.Close rs.Open "Select * from tblCustomer where ID='" & lv.SelectedItem & "'", db If rs.RecordCount <> 0 Then a = Format(rs!Birthday, "MM") b = Format(rs!Birthday, "DD") c = Format(Date, "MM") d = Format(Date, "DD") If a & b = c & d Then Label14.Visible = True txtDiscount.Visible = True cmdDiscount.Visible = True DRP.Sections("Section5").Controls("Discount").Visible = True DRP.Sections("Section5").Controls("label12").Visible = True Command1.Enabled = False Else Label14.Visible = False txtDiscount.Visible = False cmdDiscount.Visible = False DRP.Sections("Section5").Controls("Discount").Visible = False DRP.Sections("Section5").Controls("label12").Visible = False Command1.Enabled = True End If txtName = rs!Name txtAdd = rs!Add txtContact = rs!ContactNo txtFName = rs!FName txtLName = rs!LName Else Computerized Inventory System for Akihabara Store 149
End If rs.Close End Sub Private Sub lv1_DblClick() Call frame(False) 'Frame4.Enabled = True Frame3.Enabled = True cmdAdd.Enabled = True If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ID='" & lv1.SelectedItem & "'", db If rs.RecordCount <> 0 Then txtItemName = rs!ItemName txtPRice = rs!Price_Sell txtCate = rs!Groups txtID = rs!ID End If rs.Close End Sub Private Sub lv2_DblClick() If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy where ItemID = '" & lv2.SelectedItem & "' and Date = '" & lv2.ListItems(1).SubItems(4) & "'", db If rs.RecordCount <> 0 Then lblID = rs!ItemID lblName = rs!ItemName lblQty = rs!Itemqty Label22 = lv2.ListItems(1).SubItems(4) End If Frame8.Visible = True Frame5.Enabled = False ' Frame4.Enabled = False End Sub Private Sub txtItem_Change() lv1.ListItems.clear lv1.Enabled = True Computerized Inventory System for Akihabara Store 150
lblItem = "" lblCustomer = "" lv.ListItems.clear lv1.Enabled = True 'If cbosearch2 = "" Or txtItem = "" Then ' MsgBox "Please Fill up the Categories / Item Name" If cbosearch2 = "Item ID" Then If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ID like '" & txtItem & "%'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!Groups List.SubItems(3) = rs!Price_Sell List.SubItems(4) = rs!qty lblItem = "Total Item is: " & " " & rs.RecordCount rs.MoveNext Loop Else MsgBox "Record Not Found", vbCritical, "Customer" txtItem = "" txtItem.SetFocus End If ' rs.Close ElseIf cbosearch2 = "Item Name" Then If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ItemName like'" & txtItem & "%'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!Groups List.SubItems(3) = rs!Price_Sell List.SubItems(4) = rs!qty lblItem = "Total Item is: " & " " & rs.RecordCount rs.MoveNext Loop Else MsgBox "Record Not Found", vbCritical, "Customer" txtItem = "" txtItem.SetFocus Computerized Inventory System for Akihabara Store 151
End If ' rs.Close ElseIf cbosearch2 = "Item Group" Then If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where Groups like '" & txtItem & "%'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!Groups List.SubItems(3) = rs!Price_Sell List.SubItems(4) = rs!qty lblItem = "Total Item is: " & " " & rs.RecordCount rs.MoveNext Loop Else MsgBox "Record Not Found", vbCritical, "Customer" txtItem = "" txtItem.SetFocus End If 'rs.Close End If End Sub Private Sub txtItem_Click() If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Full Payment Transaction" rs!Desc = "Type text Item" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub txtSearch_Change() lv1.ListItems.clear lblSupplier = "" Computerized Inventory System for Akihabara Store 152
'If cboSearch = "" Or txtSearch = "" Then ' MsgBox "Please Fillup the Search by / type here" If cboSearch = "ID" Then lv1.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblCustomer where ID like'" & txtSearch & "%'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!Name List.SubItems(2) = rs!Add lblCustomer = "Total Customer is: " & " " & rs.RecordCount rs.MoveNext Loop lv.Enabled = True Else MsgBox "Record Not Found", vbCritical, "Customer" txtSearch = "" txtSearch.SetFocus lv.Enabled = False End If ' rs.Close ElseIf cboSearch = "First Name" Then lv1.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblCustomer where FName like'" & txtSearch.text & "%'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!Name List.SubItems(2) = rs!Add lblCustomer = "Total Customer is: " & " " & rs.RecordCount rs.MoveNext lv.Enabled = True Loop Else MsgBox "Record Not Found", vbCritical, "Customer" txtSearch = "" txtSearch.SetFocus lv.Enabled = False End If ' rs.Close Computerized Inventory System for Akihabara Store 153
ElseIf cboSearch = "Last Name" Then lv1.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblCustomer where LName like'" & txtSearch.text & "%'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!Name List.SubItems(2) = rs!Add lblCustomer = "Total Customer is: " & " " & rs.RecordCount rs.MoveNext lv.Enabled = True Loop Else MsgBox "Record Not Found", vbCritical, "Customer" txtSearch = "" txtSearch.SetFocus lv.Enabled = False End If ' rs.Close End If End Sub Private Sub txtSearch_Click() If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Full Payment Transaction" rs!Desc = "Type text Customer" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Claim Item Sub cbo() cboSearch.AddItem "First Name" cboSearch.AddItem "Last Name" End Sub Computerized Inventory System for Akihabara Store 154
Private Sub cboSearch_Click() txtSearch = "" txtSearch.SetFocus lv1.ListItems.clear lblCustomer = "" End Sub Private Sub cmdBack_Click() If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "CLAIMING " rs!Desc = "Back button" rs!Date = Date rs!Time = Time rs.Update rs.Close Unload Me frmMain.Show Call main(True) frmMain.Toolbar1.Visible = True End Sub Private Sub cmdCancel_Click() Do Until i = Text1 If rs.State = 1 Then rs.Close rs.Open "Select * from tblReserv where Name = '" & lv1.SelectedItem & "' and Date = '" & lv1.ListItems(1).SubItems(3) & "'", db txtName = rs!Name txtFName = rs!FName txtLName = rs!LName txtItem = rs!ItemName txtGroup = rs!itemGroup txtSold = rs!Itemqty txtID = rs!ItemID txtDate = rs!Date txtTime = rs!Time txtAdd = rs!Add ' txtPRice = rs!ActualPrice txtContact = rs!Contact Computerized Inventory System for Akihabara Store 155
'
txttotal1 = Val(rs!ActualPrice) * Val(rs!Itemqty) rs.Delete rs.Update If rs.State = 1 Then rs.Close rs.Open "Select * from tblClaim", db rs.AddNew rs!Name = txtName rs!Add = txtAdd rs!Contact = txtContact rs!FName = txtFName rs!LName = txtLName rs!ItemID = txtID rs!ItemName = txtItem rs!itemGroup = txtGroup rs!Itemqty = txtSold ' rs!DateCancel = Date rs!Date = txtDate ' rs!itemTotal = txttotal1 ' rs!ItemPrice = txtPRice rs!Time = txtTime rs!date_claim = Date ' rs!Transaction = "Down Payment" rs!Time_Claim = Time rs.Update rs.Close i=i+1 Loop lv1.ListItems.clear cmdCancel.Enabled = False lbltotal = "" txtSearch = "" cboSearch.clear Call cbo If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "CLAIMING " rs!Desc = "Claim button" rs!Date = Date Computerized Inventory System for Akihabara Store 156
rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdSearch_Click() lblCustomer = "" lv1.ListItems.clear If cboSearch = "" Or txtSearch = "" Then MsgBox "Please Fill up the search by and textsearch" ElseIf cboSearch = "First Name" Then If rs.State = 1 Then rs.Close rs.Open "Select * from tblReserv where FName= '" & txtSearch & "' and Date = '" & DDate & "'", db If rs.RecordCount <> 0 Then cmdCancel.Enabled = True Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!Name) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!Itemqty List.SubItems(3) = rs!Date Text1 = rs.RecordCount rs.MoveNext lv1.Enabled = True Loop End If ElseIf cboSearch = "Last Name" Then If rs.State = 1 Then rs.Close rs.Open "Select * from tblReserv where LName= '" & txtSearch & "' and date = '" & DDate & "'", db If rs.RecordCount <> 0 Then cmdCancel.Enabled = True Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!Name) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!Itemqty List.SubItems(3) = rs!Date Text1 = rs.RecordCount rs.MoveNext lv1.Enabled = True Loop End If Computerized Inventory System for Akihabara Store 157
End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "CLAIMING " rs!Desc = "Seach button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdSearchAll_Click() cboSearch.clear lblCustomer = "" lv1.ListItems.clear txtSearch = "" Call cbo cmdCancel.Enabled = False If rs.State = 1 Then rs.Close rs.Open "Select * from tblReserv", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!Name) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!Itemqty List.SubItems(3) = rs!Date rs.MoveNext lv1.Enabled = True Loop End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "CLAIMING " rs!Desc = "Seach All button" rs!Date = Date rs!Time = Time Computerized Inventory System for Akihabara Store 158
rs.Update rs.Close End Sub Private Sub Form_Load() Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 Call opendb Call cbo cmdCancel.Enabled = False DDate = Date lbltotal = "" If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "CLAIMING " rs!Desc = "Form Load" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Walk In Dim m, d, Y, f As String Sub cbo() cboSearch.AddItem "Item ID" cboSearch.AddItem "Item Name" cboSearch.AddItem "Item Group" End Sub Sub frame(X As Boolean) Frame1.Enabled = X 'Frame2.Enabled = X Frame3.Enabled = X Frame4.Enabled = X End Sub Computerized Inventory System for Akihabara Store 159
Private Sub cboGroup_Change() End Sub Private Sub cboSearch_Click() lv1.ListItems.clear txtItem = "" lblItem = "" End Sub Private Sub cmdAdd_Click() If rs.State = 1 Then rs.Close rs.Open "select * from tblDummy where itemname = '" & txtItemName & "'", db If rs.RecordCount <> 0 Then If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ItemName = '" & txtItemName & "'", db If (Val(rs!qty) < Val(txtQty)) Then If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db If rs.RecordCount = 0 Then MsgBox "Cannot Process the Qty is to low" txtQty = "" ' Else ' txtQty = "" ' Frame3.Enabled = True ' End If ElseIf txtQty = "" Or txtQty = "0" Then MsgBox "Please Enter How many do you want to buy this Item", vbQuestion, "ADD" txtQty = "" txtQty.SetFocus Else cmdPayment.Enabled = True If rs.State = 1 Then rs.Close rs.Open "Select * from tblPOS where FName= '" & "GUEST" & "' and item = '" & txtItemName & "' and date = '" & Date & "'", db a = rs!Sold rs!Sold = Val(txtQty) + Val(rs!Sold) rs!Date = Date rs!Total = Val(txtPRice) * Val(rs!Sold) Computerized Inventory System for Akihabara Store 160 ' ' '
rs!Time = Time rs.Update rs.Close If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy where FName= '" & "GUEST" & "' and itemname = '" & txtItemName & "' and date = '" & Date & "'", db b = rs!Itemqty rs!Itemqty = Val(txtQty) + Val(rs!Itemqty) rs!itemTotal = Val(txtPRice) * Val(rs!Itemqty) rs!Date = Date rs!Time = Time rs!ActualPrice = txtPRice rs.Update rs.Close If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ItemName = '" & txtItemName & "'", db If rs.RecordCount <> 0 Then rs!qty = Val(rs!qty) - Val(txtQty) rs.Update rs.Close End If If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(ItemTotal) AS Totals FROM tblDummy", db lbltotal = Format(rs!Totals, "#,###,###,###,###.00") lv2.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db Do While rs.EOF <> True Set List = lv2.ListItems.Add(, , rs!ItemID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!itemTotal List.SubItems(3) = rs!Time List.SubItems(4) = rs!Date List.SubItems(5) = rs!Itemqty Text1 = rs.RecordCount Label2 = rs.RecordCount rs.MoveNext Loop rs.Close Call frame(True) txtItemName = "" txtPRice = "" Computerized Inventory System for Akihabara Store 161
txtQty = "" txtCate = "" lv1.ListItems.clear lblItem = "" lv1.Enabled = False lv2.Enabled = True cmdBack.Enabled = False cmdAdd.Enabled = False cmdPayment.Enabled = True End If Else If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ItemName = '" & txtItemName & "'", db If (Val(rs!qty) < Val(txtQty)) Then ' ' ' If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db If rs.RecordCount = 0 Then MsgBox "Cannot Process the Qty is to low" txtQty = "" ' Else ' txtQty = "" ' Frame3.Enabled = True ' End If ElseIf txtQty = "" Or txtQty = "0" Then MsgBox "Please Enter How many do you want to buy this Item", vbQuestion, "ADD" txtQty = "" txtQty.SetFocus Else cmdPayment.Enabled = True If rs.State = 1 Then rs.Close rs.Open "Select * from tblPOS", db rs.AddNew rs!Name = "GUEST" rs!FName = "GUEST" rs!LName = "GUEST" rs!ItemID = txtID rs!item = txtItemName rs!itemGroup = txtCate rs!Sold = txtQty Computerized Inventory System for Akihabara Store 162
rs!Date = Date rs!Total = Val(txtQty) * Val(txtPRice) rs!Time = Time rs.Update rs.Close If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db rs.AddNew rs!Name = "GUEST" rs!Add = "GUEST" rs!Contact = "GUEST" rs!FName = "GUEST" rs!LName = "GUEST" rs!ItemID = txtID rs!ItemName = txtItemName rs!ItemPrice = txtPRice rs!itemGroup = txtCate rs!Itemqty = txtQty rs!itemTotal = Val(txtQty) * Val(txtPRice) rs!Date = Date rs!Time = Time rs!ActualPrice = txtPRice rs.Update rs.Close If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ItemName = '" & txtItemName & "'", db If rs.RecordCount <> 0 Then rs!qty = Val(rs!qty) - Val(txtQty) rs.Update rs.Close End If If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(ItemTotal) AS Totals FROM tblDummy", db lbltotal = Format(rs!Totals, "#,###,###,###,###.00") lv2.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db Do While rs.EOF <> True Set List = lv2.ListItems.Add(, , rs!ItemID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!itemTotal List.SubItems(3) = rs!Time Computerized Inventory System for Akihabara Store 163
List.SubItems(4) = rs!Date List.SubItems(5) = rs!Itemqty Text1 = rs.RecordCount Label2 = rs.RecordCount rs.MoveNext Loop rs.Close Call frame(True) txtItemName = "" txtPRice = "" txtQty = "" txtCate = "" lv1.ListItems.clear lblItem = "" lv1.Enabled = False lv2.Enabled = True cmdBack.Enabled = False cmdAdd.Enabled = False cmdPayment.Enabled = True End If End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "WalkIn Transaction" rs!Desc = "Add button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdBack_Click() If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "WalkIn Transaction" Computerized Inventory System for Akihabara Store 164
rs!Desc = "Back button" rs!Date = Date rs!Time = Time rs.Update rs.Close Unload Me frmMain.Show Call main(True) frmMain.Toolbar1.Visible = True End Sub Private Sub cmdpay2_Click() If DataEnvironment1.rsDummy.State = 1 Then DataEnvironment1.rsDummy.Close DataEnvironment1.rsDummy.Open "SELECT * From tblDummy" DWalk.Sections("Section4").Controls("lblDate").Caption = Date DWalk.Sections("Section5").Controls("lblTotal").Caption = Format(txtTotal, "#,###,###,###,###.00") DWalk.Sections("Section5").Controls("CR").Caption = Format(txtCR, "#,###,###,###,###.00") DWalk.Sections("Section5").Controls("CC").Caption = Format(txtCC, "#,###,###,###,###.00") DWalk.Show If rs.State = 1 Then rs.Close rs.Open "Delete * from tblDummy", db txtTotal = "" txtCR = "" txtCC = "" Frame4.Visible = False lv2.ListItems.clear txtName = "" txtAdd = "" txtContact = "" Call frame(True) Frame3.Enabled = False cmdBack.Enabled = True lbltotal = "" If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "WalkIn Transaction" rs!Desc = "Print button" Computerized Inventory System for Akihabara Store 165
rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdpay3_Click() If (Val(txtTotal) > Val(txtCR)) Then MsgBox "too short" txtCR = "" txtCR.SetFocus Else txtCC = Val(txtCR) - Val(txtTotal) txtprocess = "Full Payed" cmdpay2.Enabled = True If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "WalkIn Transaction" rs!Desc = "Pay button" rs!Date = Date rs!Time = Time rs.Update rs.Close End If End Sub Private Sub cmdPayment_Click() Call frame(False) Frame4.Enabled = True Frame4.Visible = True txtTotal = Format(lbltotal, "########00") cmdpay2.Enabled = False End Sub Private Sub cmdsearch3_Click() lv1.ListItems.clear lbltotal = "" txtItem = "" Computerized Inventory System for Akihabara Store 166
cboSearch.clear Call cbo If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem ", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!Groups List.SubItems(3) = rs!Price_Sell List.SubItems(4) = rs!qty lblItem = "Total Item is: " & " " & rs.RecordCount rs.MoveNext lv1.Enabled = True Loop End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "WalkIn Transaction" rs!Desc = "Search All button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub Command1_Click() If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy where ItemID = '" & lblID & "' and Date = '" & Date & "'", db item = rs!ItemName If txtDqty = "0" Or txtDqty = "" Then txtDqty = "" MsgBox "Please enter how many do u want do delete" ElseIf Val(txtDqty) > Val(rs!Itemqty) Then MsgBox "out of range" txtDqty = "" ElseIf Val(txtDqty) = Val(rs!Itemqty) Then If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy where ItemID = '" & lblID & "' and Date = '" & Date & "'", db Computerized Inventory System for Akihabara Store 167
rs.Delete rs.Update rs.Close If rs.State = 1 Then rs.Close rs.Open "Select * from tblPOS where name = '" & "GUEST" & "' and ItemID = '" & lblID & "'and Date = '" & Date & "'", db rs.Delete rs.Update rs.Close
' If rs.State = 1 Then rs.Close ' rs.Open "SELECT SUM(itemqty) as totalqty From tbldummy", db ' If rs.RecordCount = 0 Then ' label2 = rs!totalqty ' Else ' label2 = "" ' End If ' rs.Close If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ItemName= '" & item & "'", db rs!qty = Val(rs!qty) + Val(txtDqty) rs.Update rs.Close lv2.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db If rs.RecordCount = 0 Then lbltotal = "" cmdPayment.Enabled = False Frame4.Enabled = False Frame5.Enabled = False Label2 = "" cmdBack.Enabled = True Else If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(ItemTotal) AS Totals FROM tblDummy", db Computerized Inventory System for Akihabara Store 168
lbltotal = Format(rs!Totals, "#,###,###,###,###.00") rs.Close End If If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db Do While rs.EOF <> True Set List = lv2.ListItems.Add(, , rs!ItemID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!itemTotal List.SubItems(3) = rs!Time List.SubItems(4) = rs!Date List.SubItems(5) = rs!Itemqty ' label2 = rs.RecordCount rs.MoveNext Loop rs.Close If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(itemqty) as totalqty From tbldummy", db If rs.RecordCount = 0 Then Label2 = rs!totalqty Else Label2 = "" End If rs.Close Frame8.Visible = False Frame5.Enabled = True txtDqty = ""
Else If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy where ItemID = '" & lblID & "' and Date = '" & Label22 & "'", db If rs.RecordCount <> 0 Then item = rs!ItemName Computerized Inventory System for Akihabara Store 169
jinky = rs!ItemPrice tom = rs!itemTotal nash = rs!ActualPrice jia = Val(rs!Itemqty) - Val(txtDqty) wa = Val(rs!itemTotal) / Val(rs!Itemqty) outs = Val(Label24) * Val(txtDqty) rs!itemTotal = Val(rs!itemTotal) - Val(wa) v = Val(rs!itemTotal) - Val(wa) rs!Itemqty = Val(rs!Itemqty) - Val(txtDqty) rs!ActualPrice = Val(nash) - Val(outs) rs.Update rs.Close If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ItemName= '" & item & "'", db rs!qty = Val(rs!qty) + Val(txtDqty) rs.Update rs.Close End If If rs.State = 1 Then rs.Close rs.Open "Select * from tblPOS where name = '" & "GUEST" & "' and ItemID = '" & lblID & "'and Date = '" & Label22 & "'", db 'rs!total = Val(rs!total) - Val(v) rs!Sold = Val(rs!Sold) - Val(txtDqty) rs!Total = Val(nash) - Val(outs) rs.Update rs.Close lv2.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db If rs.RecordCount = 0 Then cmdCancel.Enabled = True lbltotal = "" cmdPayment.Enabled = False Frame4.Enabled = False Frame5.Enabled = False Label2 = "" Computerized Inventory System for Akihabara Store 170
Else If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(ItemTotal) AS Totals FROM tblDummy", db lbltotal = Format(rs!Totals, "#,###,###,###,###.00") rs.Close End If If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db Do While rs.EOF <> True Set List = lv2.ListItems.Add(, , rs!ItemID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!itemTotal List.SubItems(3) = rs!Time List.SubItems(4) = rs!Date List.SubItems(5) = rs!Itemqty ' label2 = rs.RecordCount rs.MoveNext Loop rs.Close If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(itemqty) as totalqty From tbldummy", db If rs.RecordCount = 0 Then Label2 = "" Else Label2 = rs!totalqty End If rs.Close If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Downpayment Transaction" rs!Desc = "Delete button" rs!Date = Date rs!Time = Time rs.Update rs.Close Frame8.Visible = False Frame5.Enabled = True Computerized Inventory System for Akihabara Store 171
txtDqty = "" End If End Sub Private Sub Command3_Click() Frame1.Enabled = True txtItemName = "" txtPRice = "" txtQty = "" txtCate = "" lv1.ListItems.clear lblItem = "" lv1.Enabled = False cmdAdd.Enabled = False Frame4.Visible = False Frame5.Enabled = True Frame3.Enabled = True End Sub Private Sub Command4_Click() Frame8.Visible = False Frame5.Enabled = True Frame4.Enabled = True End Sub Private Sub Command5_Click() Do Until i = Text1 If rs.State = 1 Then rs.Close rs.Open "Select * from tbldummy where FName = '" & "GUEST" & "' and Date = '" & Date & "'", db txtitem1 = rs!ItemName txtSold = rs!Itemqty rs.Delete rs.Update If rs.State = 1 Then rs.Close rs.Open "Select * from tblpos where FName = '" & "GUEST" & "' and Date = '" & Date & "'", db rs.Delete rs.Update If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ItemName= '" & txtitem1 & "'", db rs!qty = Val(rs!qty) + Val(txtSold) rs.Update Computerized Inventory System for Akihabara Store 172
rs.Close i=i+1 Loop lv2.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db If rs.RecordCount = 0 Then ' cmdCancel.Enabled = True lbltotal = "" cmdPayment.Enabled = False ' Frame4.Enabled = False Frame5.Enabled = True Label18 = "" cmdBack.Enabled = True frmReserveD.Enabled = False Else If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(ItemTotal) AS Totals FROM tblDummy", db lbltotal = Format(rs!Totals, "#,###,###,###,###.00") rs.Close End If If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy", db Do While rs.EOF <> True Set List = lv2.ListItems.Add(, , rs!ItemID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!itemTotal List.SubItems(3) = rs!Time List.SubItems(4) = rs!Date List.SubItems(5) = rs!Itemqty ' Label18 = rs.RecordCount rs.MoveNext Loop rs.Close If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(itemqty) as totalqty From tbldummy", db If rs.RecordCount = 0 Then Label18 = rs!totalqty Else Computerized Inventory System for Akihabara Store 173
Label18 = "" End If rs.Close 'Command6.Enabled = False If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Cancel Downpayment " rs!Desc = "Cancel button" & Chr(32) & txtName rs!Date = Date rs!Time = Time rs.Update rs.Close ' Frame1.Enabled = True End Sub Private Sub Form_Load() Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 Call opendb Frame8.Visible = False Call cbo Call frame(False) Frame1.Enabled = True lv1.Enabled = False cmdPayment.Enabled = False m = Format(Date, "M") d = Format(Date, "DD") Y = Format(Date, "YYYY") f = m & "/" & d & "/" & Y
174
If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "WalkIn Transaction" rs!Desc = "Form Load" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub
Private Sub lv1_DblClick() Call frame(True) Frame3.Enabled = False cmdAdd.Enabled = True If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ID='" & lv1.SelectedItem & "'", db If rs.RecordCount <> 0 Then txtItemName = rs!ItemName txtPRice = rs!Price_Sell txtCate = rs!Groups txtID = rs!ID End If rs.Close frmReserveD.Enabled = True End Sub Private Sub lv2_DblClick() If rs.State = 1 Then rs.Close rs.Open "Select * from tblDummy where ItemID = '" & lv2.SelectedItem & "' and Date = '" & lv2.ListItems(1).SubItems(4) & "'", db If rs.RecordCount <> 0 Then lblID = rs!ItemID lblName = rs!ItemName lblQty = rs!Itemqty Label22 = lv2.ListItems(1).SubItems(4)
175
End If Frame8.Visible = True Frame5.Enabled = False Frame4.Enabled = False End Sub Private Sub txtItem_Change() lv1.ListItems.clear lblItem = "" lblCustomer = "" 'If cboSearch = "" Or txtItem = "" Then ' MsgBox "Please Fill up the Categories / Item Name" If cboSearch = "Item ID" Then If rs.State = 1 Then rs.Close lv1.ListItems.clear rs.Open "Select * from tblItem where ID like '" & txtItem & "%'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!Groups List.SubItems(3) = rs!Price_Sell List.SubItems(4) = rs!qty lblItem = "Total Item is: " & " " & rs.RecordCount rs.MoveNext lv1.Enabled = True Loop Else MsgBox "Record Not Found", vbCritical, "Customer" txtItem = "" txtItem.SetFocus End If ' rs.Close ElseIf cboSearch = "Item Name" Then lv1.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where ItemName like '" & txtItem & "%'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!ID) Computerized Inventory System for Akihabara Store 176
List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!Groups List.SubItems(3) = rs!Price_Sell List.SubItems(4) = rs!qty lblItem = "Total Item is: " & " " & rs.RecordCount rs.MoveNext lv1.Enabled = True Loop Else MsgBox "Record Not Found", vbCritical, "Customer" txtItem = "" txtItem.SetFocus End If ' rs.Close ElseIf cboSearch = "Item Group" Then lv1.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblItem where Groups like '" & txtItem & "%'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!Groups List.SubItems(3) = rs!Price_Sell List.SubItems(4) = rs!qty lblItem = "Total Item is: " & " " & rs.RecordCount rs.MoveNext lv1.Enabled = True Loop Else MsgBox "Record Not Found", vbCritical, "Customer" txtItem = "" txtItem.SetFocus ' End If End Sub Private Sub txtItem_Click() Computerized Inventory System for Akihabara Store 177 End If rs.Close
If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "WalkIn Transaction" rs!Desc = "Type text" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Audit Private Sub cmdBack_Click() Unload Me frmMain.Show frmMain.Toolbar1.Visible = True Call main(True) End Sub Private Sub cmdPrint_Click() If DataEnvironment1.rsAudit.State = 1 Then DataEnvironment1.rsAudit.Close DataEnvironment1.rsAudit.Open "SELECT * From tblAudit Where Date >='" & Dstart & "' and Date <='" & Dend & "' and Name = '" & txtName & "'" DAudit.Sections("Section4").Controls("label9").Caption = Dstart DAudit.Sections("Section4").Controls("label10").Caption = Dend DAudit.Show lv1.ListItems.clear End Sub Private Sub cmdProcess_Click() lv1.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblAudit Where Date >='" & Dstart & "' and Date <='" & Dend & "' and Name = '" & txtName & "'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!Name) List.SubItems(1) = rs!Level List.SubItems(2) = rs!Access List.SubItems(3) = rs!Desc List.SubItems(4) = rs!Date Computerized Inventory System for Akihabara Store 178
List.SubItems(5) = Time rs.MoveNext Loop End If End Sub Private Sub Form_Load() Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 Call opendb Dstart = Date Dend = Date End Sub Cancelling Item Private Sub cmdBack_Click() If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Cancel Item Report" rs!Desc = "Back Button" rs!Date = Date rs!Time = Time rs.Update rs.Close Unload Me frmMain.Show Call main(True) frmMain.Toolbar1.Visible = True End Sub Private Sub cmdPrint_Click() If DataEnvironment1.rsBackPay.State = 1 Then DataEnvironment1.rsBackPay.Close DataEnvironment1.rsBackPay.Open "SELECT * From tblBackPay Where DateCancel >='" & Dstart & "' and DateCancel <='" & Dend & "'" DBackPay.Sections("Section5").Controls("lbltotal1").Caption = Text2 DBackPay.Sections("Section5").Controls("lbltotal2").Caption = Text1 DBackPay.Sections("Section4").Controls("lblstart").Caption = Dstart Computerized Inventory System for Akihabara Store 179
DBackPay.Sections("Section4").Controls("lblend").Caption = Dend DBackPay.Show cmdPrint.Enabled = False lv1.ListItems.clear Text1 = "" Text2 = "" Label1 = "" If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Cancel Item Report" rs!Desc = "Print Button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdSearch_Click() cmdPrint.Enabled = True If rs.State = 1 Then rs.Close rs.Open "Select * from tblBackpay where DateCancel>= '" & Dstart & "' and DateCancel<= '" & Dend & "'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!Name) List.SubItems(1) = rs!ItemID List.SubItems(2) = rs!ItemName List.SubItems(3) = rs!ItemPrice List.SubItems(4) = rs!Itemqty List.SubItems(5) = rs!itemTotal List.SubItems(6) = rs!DateReserve List.SubItems(7) = rs!DateCancel List.SubItems(8) = rs!Transaction Text2 = rs.RecordCount rs.MoveNext Loop If rs.State = 1 Then rs.Close Computerized Inventory System for Akihabara Store 180
rs.Open "SELECT SUM(ItemTotal) as total From tblbackpay Where DateCancel >='" & Dstart & "' and DateCancel <='" & Dend & "'", db If rs.RecordCount <> 0 Then Label1 = "Total is: " & " " & Format(rs!Total, "#,###,###,###,###.00") Text1 = Format(rs!Total, "#,###,###,###,###.00") End If rs.Close Else MsgBox "No Record Found" cmdPrint.Enabled = False End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Cancel Item Report" rs!Desc = "Search Button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub Form_Load() Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 Call opendb Dstart = Date Dend = Date cmdPrint.Enabled = False Label1 = "" If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Cancel Item Report" Computerized Inventory System for Akihabara Store 181
rs!Desc = "Form Load" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Critical Item Dim a As Integer Private Sub cmdBack_Click() Unload Me Call main(True) frmMain.Toolbar1.Visible = True End Sub Private Sub Form_Load() a=0 Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 Call opendb If rs.State = 1 Then rs.Close rs.Open "Select * from tblitem ", db Do While rs.EOF <> True If rs!qty <= 5 Then Set List = lv2.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!qty a=a+1 End If rs.MoveNext Loop Label2 = "Total Critical Sell Item is: " & " " & a End Sub
Expenses Private Sub cmdBack_Click() If rs.State = 1 Then rs.Close Computerized Inventory System for Akihabara Store 182
rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Expenses Report" rs!Desc = "Back button" rs!Date = Date rs!Time = Time rs.Update rs.Close Unload Me frmMain.Show Call main(True) frmMain.Toolbar1.Visible = True End Sub Private Sub cmdPrint_Click() If DataEnvironment1.rsExpenses.State = 1 Then DataEnvironment1.rsExpenses.Close DataEnvironment1.rsExpenses.Open "SELECT * From tblExpenses Where Date >='" & Dstart & "' and Date <='" & Dend & "'" DExpenses.Sections("Section5").Controls("lbltotal1").Caption = Text2 DExpenses.Sections("Section5").Controls("lbltotal2").Caption = Text1 DExpenses.Sections("Section4").Controls("lblstart").Caption = Dstart DExpenses.Sections("Section4").Controls("lblend").Caption = Dend DExpenses.Show cmdPrint.Enabled = False lv1.ListItems.clear Text1 = "" Text2 = "" Label1 = "" If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Expenses Report" rs!Desc = "Print button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Computerized Inventory System for Akihabara Store 183
Private Sub cmdSearch_Click() cmdPrint.Enabled = True If rs.State = 1 Then rs.Close rs.Open "Select * from tblExpenses where Date>= '" & Dstart & "' and Date<= '" & Dend & "'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!Name) List.SubItems(1) = rs!ItemID List.SubItems(2) = rs!ItemName List.SubItems(3) = rs!ItemPrice List.SubItems(4) = rs!Itemqty List.SubItems(5) = rs!itemTotal List.SubItems(6) = rs!Date Text2 = rs.RecordCount rs.MoveNext Loop If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(ItemTotal) as total From tblExpenses Where Date >='" & Dstart & "' and Date <='" & Dend & "'", db If rs.RecordCount <> 0 Then Label1 = "Total is: " & " " & Format(rs!Total, "#,###,###,###,###.00") Text1 = Format(rs!Total, "#,###,###,###,###.00") End If rs.Close Else MsgBox "No Record Found" cmdPrint.Enabled = False End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Expenses Report" rs!Desc = "Search button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Computerized Inventory System for Akihabara Store 184
Private Sub Form_Load() Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 Call opendb Dstart = Date Dend = Date cmdPrint.Enabled = False Label1 = "" If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Expenses Report" rs!Desc = "Form Load" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub
Item Stock Dim R As Integer Sub cbo() If rs.State = 1 Then rs.Close rs.Open "Select * from tblGroup order by tblGroup.Grouped", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True cboSearch.AddItem rs!Grouped rs.MoveNext Loop End If rs.Close End Sub Private Sub cmdBack_Click() Computerized Inventory System for Akihabara Store 185
If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Item Stock Report" rs!Desc = "Back button" rs!Date = Date rs!Time = Time rs.Update rs.Close Unload Me frmMain.Show Call main(True) frmMain.Toolbar1.Visible = True End Sub Private Sub cmdPrint_Click() If R = 1 Then If DataEnvironment1.rsStock.State = 1 Then DataEnvironment1.rsStock.Close DataEnvironment1.rsStock.Open "SELECT * From tblStock Where Groups ='" & cboSearch & "'" DStock.Sections("Section5").Controls("lblitem").Caption = Text1 DStock.Sections("Section4").Controls("lbldate").Caption = Date DStock.Show ElseIf R = 2 Then If DataEnvironment1.rsStock.State = 1 Then DataEnvironment1.rsStock.Close DataEnvironment1.rsStock.Open "SELECT * From tblStock'" DStock.Sections("Section5").Controls("lblitem").Caption = Text1 DStock.Sections("Section4").Controls("lbldate").Caption = Date DStock.Show End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Item Stock Report" rs!Desc = "Print button" rs!Date = Date rs!Time = Time rs.Update rs.Close Computerized Inventory System for Akihabara Store 186
End Sub Private Sub cmdSearch_Click() R=1 lv1.ListItems.clear If rs.State = 1 Then rs.Close rs.Open "Select * from tblStock where Groups='" & cboSearch & "'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!Groups List.SubItems(3) = rs!qty Label1 = "Total Item is: " & " " & rs.RecordCount Text1 = rs.RecordCount rs.MoveNext Loop cmdPrint.Enabled = True Else MsgBox "Record Not Found / Select Group" lv1.ListItems.clear Label1 = "" cmdPrint.Enabled = False End If rs.Close If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Item Stock Report" rs!Desc = "Search button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdSearchAll_Click() R=2 lv1.ListItems.clear If rs.State = 1 Then rs.Close Computerized Inventory System for Akihabara Store 187
rs.Open "Select * from tblStock order by tblstock.ID", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!ID) List.SubItems(1) = rs!ItemName List.SubItems(2) = rs!Groups List.SubItems(3) = rs!qty Label1 = "Total Item is: " & " " & rs.RecordCount Text1 = rs.RecordCount cmdPrint.Enabled = True rs.MoveNext Loop End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Item Stock Report" rs!Desc = "Search All button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub Form_Load() Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 R=0 Call opendb Call cbo cmdPrint.Enabled = False
If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser Computerized Inventory System for Akihabara Store 188
rs!Level = frmMain.txtlevel rs!Access = "Item Stock Report" rs!Desc = "Form Load" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Point of Sale Private Sub cmdBack_Click() If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Point of Sale Report" rs!Desc = "Back button" rs!Date = Date rs!Time = Time rs.Update rs.Close Unload Me frmMain.Show Call main(True) frmMain.Toolbar1.Visible = True End Sub Private Sub cmdPrint_Click() If DataEnvironment1.rsPOS.State = 1 Then DataEnvironment1.rsPOS.Close DataEnvironment1.rsPOS.Open "SELECT * From tblPOS Where Date >='" & Dstart & "' and Date <='" & Dend & "'" DPOS.Sections("Section5").Controls("lbltotal1").Caption = Text2 DPOS.Sections("Section5").Controls("lbltotal2").Caption = Text1 DPOS.Sections("Section4").Controls("lblstart").Caption = Dstart DPOS.Sections("Section4").Controls("lblend").Caption = Dend DPOS.Show cmdPrint.Enabled = False lv1.ListItems.clear Text1 = "" Computerized Inventory System for Akihabara Store 189
Text2 = "" Label1 = "" If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Point of Sale Report" rs!Desc = "Print button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdSearch_Click() cmdPrint.Enabled = True If rs.State = 1 Then rs.Close rs.Open "Select * from tblPOS where Date>= '" & Dstart & "' and Date<= '" & Dend & "'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!Name) List.SubItems(1) = rs!ItemID List.SubItems(2) = rs!item List.SubItems(3) = rs!Total List.SubItems(4) = rs!Date Text2 = rs.RecordCount rs.MoveNext Loop If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(total) as totals From tblPOS Where Date >='" & Dstart & "' and Date <='" & Dend & "'", db If rs.RecordCount <> 0 Then Label1 = "Total is: " & " " & Format(rs!Totals, "#,###,###,###,###.00") Text1 = Format(rs!Totals, "#,###,###,###,###.00") End If rs.Close Else MsgBox "No Record Found" cmdPrint.Enabled = False End If Computerized Inventory System for Akihabara Store 190
If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Point of Sale Report" rs!Desc = "Search button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub Form_Load() Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 Call opendb Dstart = Date Dend = Date cmdPrint.Enabled = False Label1 = "" If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Point of Sale Report" rs!Desc = "Form Load" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub
Private Sub cmdBack_Click() If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Pending Delivery Report" rs!Desc = "Back button" rs!Date = Date rs!Time = Time rs.Update rs.Close Unload Me frmMain.Show Call main(True) frmMain.Toolbar1.Visible = True End Sub Private Sub cmdPrint_Click() If DataEnvironment1.rsPending.State = 1 Then DataEnvironment1.rsPending.Close DataEnvironment1.rsPending.Open "SELECT * From tblUnDelivery Where Date >='" & Dstart & "' and Date <='" & Dend & "'" DPending.Sections("Section5").Controls("lbltotal1").Caption = Text2 DPending.Sections("Section5").Controls("lbltotal2").Caption = Text1 DPending.Sections("Section4").Controls("lblstart").Caption = Dstart DPending.Sections("Section4").Controls("lblend").Caption = Dend DPending.Show cmdPrint.Enabled = False lv1.ListItems.clear Text1 = "" Text2 = "" Label1 = "" If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Pending Delivery Report" rs!Desc = "Print button" rs!Date = Date rs!Time = Time Computerized Inventory System for Akihabara Store 192
rs.Update rs.Close End Sub Private Sub cmdSearch_Click() cmdPrint.Enabled = True If rs.State = 1 Then rs.Close rs.Open "Select * from tblUnDelivery where Date>= '" & Dstart & "' and Date<= '" & Dend & "'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True Set List = lv1.ListItems.Add(, , rs!Name) List.SubItems(1) = rs!ItemID List.SubItems(2) = rs!ItemName List.SubItems(3) = rs!ItemPrice List.SubItems(4) = rs!Itemqty List.SubItems(5) = rs!itemTotal List.SubItems(6) = rs!Date Text2 = rs.RecordCount rs.MoveNext Loop If rs.State = 1 Then rs.Close rs.Open "SELECT SUM(ItemTotal) as total From tblUnDelivery Where Date >='" & Dstart & "' and Date <='" & Dend & "'", db If rs.RecordCount <> 0 Then Label1 = "Total is: " & " " & Format(rs!Total, "#,###,###,###,###.00") Text1 = Format(rs!Total, "#,###,###,###,###.00") End If rs.Close Else MsgBox "No Record Found" cmdPrint.Enabled = False End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Pending Delivery Report" rs!Desc = "Seach button" rs!Date = Date rs!Time = Time rs.Update rs.Close Computerized Inventory System for Akihabara Store 193
End Sub Private Sub Form_Load() Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 Call opendb Dstart = Date Dend = Date cmdPrint.Enabled = False Label1 = ""
If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Pending Delivery Report" rs!Desc = "Form Load" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Utilities (Back up) Private Sub cmdCancel_Click() If Timer1.Enabled = True Then a = MsgBox("Do you want to cancel the backup?", vbQuestion + vbYesNo, "Back Up") If a = vbYes Then Kill (txtDestination) Unload Me frmMain.Show Call main(True) frmMain.Toolbar1.Visible = True If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db Computerized Inventory System for Akihabara Store 194
rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Backup Database " rs!Desc = "Cancel Button" rs!Date = Date rs!Time = Time rs.Update rs.Close End If ElseIf MsgBox("Do you want to Back?", vbQuestion + vbYesNo, "Back Up") = vbYes Then Unload Me Call main(True) frmMain.Show frmMain.Toolbar1.Visible = True If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Backup Database " rs!Desc = "Cancel Button" rs!Date = Date rs!Time = Time rs.Update rs.Close End If End Sub Private Sub cmdSave_Click() If txtDestination = "" Then MsgBox "Path and destination require", vbInformation + vbYesNo, "Back Up" Else CopyFile App.Path & "\Database.mdb", txtDestination, False Timer1.Enabled = True pb1.Visible = True cmdSave.Enabled = False If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser Computerized Inventory System for Akihabara Store 195
rs!Level = frmMain.txtlevel rs!Access = "Backup Database " rs!Desc = "Save Button" rs!Date = Date rs!Time = Time rs.Update rs.Close End If End Sub Private Sub cmdSearch2_Click() cd1.Filter = "(*.mdb)|*.mdb" cd1.ShowSave txtDestination = cd1.FileName If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Backup Database " rs!Desc = "Browse Button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub Form_Load() Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 Call opendb If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Backup Database " rs!Desc = "Form Load" rs!Date = Date rs!Time = Time rs.Update rs.Close Computerized Inventory System for Akihabara Store 196
End Sub Private Sub Timer1_Timer() pb1.Value = pb1.Value + 1 If pb1.Value = 100 Then Unload Me Timer1.Enabled = False pb1.Visible = False MsgBox "Successful Backup", vbInformation, "Back Up" frmMain.Enabled = True frmMain.Show End If End Sub Restore Private Sub cmdCancel_Click() If Timer1.Enabled = True Then a = MsgBox("Do you want to cancel the Restore?", vbQuestion + vbYesNo, "Restore") If a = vbYes Then If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Restore Database" rs!Desc = "Back button" rs!Date = Date rs!Time = Time rs.Update rs.Close Unload Me frmMain.Show Call main(True) frmMain.Toolbar1.Visible = True End If ElseIf MsgBox("Do you want to Back?", vbQuestion + vbYesNo, "Restore") = vbYes Then If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser Computerized Inventory System for Akihabara Store 197
rs!Level = frmMain.txtlevel rs!Access = "Restore Database" rs!Desc = "Back button" rs!Date = Date rs!Time = Time rs.Update rs.Close Unload Me frmMain.Show Call main(True) frmMain.Toolbar1.Visible = True End If End Sub Private Sub cmdSave_Click() If txtDestination = "" Then MsgBox "Path and destination require", vbInformation + vbYesNo, "Restore" Else CopyFile txtDestination, App.Path & "\Database.mdb", False Timer1.Enabled = True pb1.Visible = True cmdSave.Enabled = False If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Restore Database" rs!Desc = "Restore button" rs!Date = Date rs!Time = Time rs.Update rs.Close End If End Sub Private Sub cmdSearch2_Click() cd1.Filter = "(*.mdb)|*.mdb" cd1.ShowOpen txtDestination = cd1.FileName cmdSave.Enabled = True If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew Computerized Inventory System for Akihabara Store 198
rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Restore Database" rs!Desc = "Browse button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub Form_Load() Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 Call opendb cmdSave.Enabled = False
If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Restore Database" rs!Desc = "Form Load" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub Timer1_Timer() pb1.Value = pb1.Value + 1 If pb1.Value = 100 Then Unload Me Timer1.Enabled = False pb1.Visible = False MsgBox "Successful Restore", vbInformation, "Restore" frmMain.Show Computerized Inventory System for Akihabara Store 199
Customer Restore Private Sub cmdCancel_Click() If Timer1.Enabled = True Then a = MsgBox("Do you want to cancel the Restore?", vbQuestion + vbYesNo, "Restore") If a = vbYes Then If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Restore Database" rs!Desc = "Back button" rs!Date = Date rs!Time = Time rs.Update rs.Close Unload Me frmMain.Show Call main(True) frmMain.Toolbar1.Visible = True End If ElseIf MsgBox("Do you want to Back?", vbQuestion + vbYesNo, "Restore") = vbYes Then If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Restore Database" rs!Desc = "Back button" rs!Date = Date rs!Time = Time rs.Update rs.Close Computerized Inventory System for Akihabara Store 200
Unload Me frmMain.Show Call main(True) frmMain.Toolbar1.Visible = True End If End Sub Private Sub cmdSave_Click() If txtDestination = "" Then MsgBox "Path and destination require", vbInformation + vbYesNo, "Restore" Else CopyFile txtDestination, App.Path & "\Database.mdb", False Timer1.Enabled = True pb1.Visible = True cmdSave.Enabled = False If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Restore Database" rs!Desc = "Restore button" rs!Date = Date rs!Time = Time rs.Update rs.Close End If End Sub Private Sub cmdSearch2_Click() cd1.Filter = "(*.mdb)|*.mdb" cd1.ShowOpen txtDestination = cd1.FileName cmdSave.Enabled = True If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Restore Database" rs!Desc = "Browse button" rs!Date = Date rs!Time = Time rs.Update Computerized Inventory System for Akihabara Store 201
rs.Close End Sub Private Sub Form_Load() Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 Call opendb cmdSave.Enabled = False
If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Restore Database" rs!Desc = "Form Load" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub Timer1_Timer() pb1.Value = pb1.Value + 1 If pb1.Value = 100 Then Unload Me Timer1.Enabled = False pb1.Visible = False MsgBox "Successful Restore", vbInformation, "Restore" frmMain.Show frmMain.Enabled = True End If End Sub
202
Lock Private Sub Command1_Click() If Text1 = "Secret" Then labas = "Lock" 'Call sarado Unload Me frmMain.Show Call main(True) frmMain.Toolbar1.Visible = True Else MsgBox "Your Input is Wrong" Text1.SetFocus End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Lock" rs!Desc = "Unlock button" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub Form_Load() Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 Call opendb
If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Lock" rs!Desc = "Form Load" rs!Date = Date rs!Time = Time Computerized Inventory System for Akihabara Store 203
rs.Update rs.Close End Sub Private Sub Text1_Click() If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Lock" rs!Desc = "Type Text" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Accessibility Dim cr1, account1, CustomerI1, Critical1, SupplierI1, ItemI1, CustomerT1, SupplierT1, AccessS1, ChangeS1, ValidateS1, Calc1, Note1, AuditR1, CancelR1, ExpensesR1, ItemR1, POSR1, PendingR1, DatabaseU1, CustomerU1, LockU1 As String Dim cr2, account2, CustomerI2, Critical2, SupplierI2, ItemI2, CustomerT2, SupplierT2, AccessS2, ChangeS2, ValidateS2, Calc2, Note2, AuditR2, CancelR2, ExpensesR2, ItemR2, POSR2, PendingR2, DatabaseU2, CustomerU2, LockU2 As String Sub frame(X As Boolean) Frame3.Enabled = X Frame4.Enabled = X Frame5.Enabled = X Frame6.Enabled = X Frame7.Enabled = X Frame8.Enabled = X End Sub Private Sub cboUser_Click() If rs.State = 1 Then rs.Close rs.Open "Select * from tblAccessNo where Name = '" & cboUser & "'", db If rs.RecordCount <> 0 Then If rs!mnuAccount = 1 Then chkAccount.Value = 1 Computerized Inventory System for Akihabara Store 204
account1 = "True" account2 = "1" Else chkAccount.Value = 0 account1 = "False" account2 = "0" End If If rs!mnuCustomer = 1 Then chkCustomerI.Value = 1 CustomerI1 = "True" CustomerI2 = "1" Else chkCustomerI.Value = 0 CustomerI1 = "False" CustomerI2 = "0" End If If rs!mnuSupplier = 1 Then chkSupplierI.Value = 1 SupplierI1 = "True" SupplierI2 = "1" Else chkSupplierI.Value = 0 SupplierI1 = "False" SupplierI2 = "0" End If If rs!mnuItem = 1 Then chkItemI.Value = 1 ItemI1 = "True" ItemI2 = "1" Else chkItemI.Value = 0 ItemI1 = "False" ItemI2 = "0" End If If rs!mnuCustomer2 = 1 Then chkCustomerT.Value = 1 CustomerT1 = "True" CustomerT2 = "1" Else Computerized Inventory System for Akihabara Store 205
chkCustomerT.Value = 0 CustomerT1 = "False" CustomerT2 = "0" End If If rs!mnuSupplier2 = 1 Then chkSupplierT.Value = 1 SupplierT1 = "True" SupplierT2 = "1" Else chkSupplierT.Value = 0 SupplierT1 = "False" SupplierT2 = "0" End If If rs!mnuAudit = 1 Then chkAuditR.Value = 1 AuditR1 = "True" AuditR2 = "1" Else chkAuditR.Value = 0 AuditR1 = "False" AuditR2 = "0" End If If rs!mnuCancel = 1 Then chkCancelR.Value = 1 CancelR1 = "True" CancelR2 = "1" Else chkCancelR.Value = 0 CancelR1 = "False" CancelR2 = "0" End If If rs!mnuExpenses = 1 Then chkExpensesR.Value = 1 ExpensesR1 = "True" ExpensesR2 = "1" Else chkExpensesR.Value = 0 ExpensesR1 = "False" ExpensesR2 = "0" Computerized Inventory System for Akihabara Store 206
End If If rs!mnuItemStock = 1 Then chkItemR.Value = 1 ItemR1 = "True" ItemR2 = "1" Else chkItemR.Value = 0 ItemR1 = "False" ItemR2 = "0" End If If rs!mnuPOS = 1 Then chkPOSR.Value = 1 POSR1 = "True" POSR2 = "1" Else chkPOSR.Value = 0 POSR1 = "False" POSR2 = "0" End If If rs!mnuPending = 1 Then chkPendingR.Value = 1 PendingR1 = "True" PendingR2 = "1" Else chkPendingR.Value = 0 PendingR1 = "False" PendingR2 = "0" End If If rs!mnuDatabase = 1 Then chkDatabaseU.Value = 1 DatabaseU1 = "True" DatabaseU2 = "1" Else chkDatabaseU.Value = 0 DatabaseU1 = "False" DatabaseU2 = "0" End If If rs!mnuCustomerRestore = 1 Then Computerized Inventory System for Akihabara Store 207
chkCustomerU.Value = 1 CustomerU1 = "True" CustomerU2 = "1" Else chkCustomerU.Value = 0 CustomerU1 = "False" CustomerU2 = "0" End If If rs!mnuLock = 1 Then chkLockU.Value = 1 LockU1 = "True" LockU2 = "1" Else chkLockU.Value = 0 LockU1 = "False" LockU2 = "0" End If If rs!mnuCalc = 1 Then chkCalc.Value = 1 Calc1 = "True" Calc2 = "1" Else chkCalc.Value = 0 Calc1 = "False" Calc2 = "0" End If If rs!mnuNotepad = 1 Then chkNote.Value = 1 Note1 = "True" Note2 = "1" Else chkNote.Value = 0 Note1 = "False" Note2 = "0" End If If rs!mnuAccess = 1 Then chkAccessS.Value = 1 AccessS1 = "True" AccessS2 = "1" Computerized Inventory System for Akihabara Store 208
Else chkAccessS.Value = 0 AccessS1 = "False" AccessS2 = "0" End If If rs!mnuCP = 1 Then chkChangeS.Value = 1 ChangeS1 = "True" ChangeS2 = "1" Else chkChangeS.Value = 0 ChangeS1 = "False" ChangeS2 = "0" End If If rs!mnuValid = 1 Then chkValidateS.Value = 1 ValidateS1 = "True" ValidateS2 = "1" Else chkValidateS.Value = 0 ValidateS1 = "False" ValidateS2 = "0" End If If rs!mnuCritical = 1 Then chkCritical.Value = 1 Critical1 = "True" Critical2 = "1" Else chkCritical.Value = 0 Critical1 = "False" Critical2 = "0" End If If rs!mnuClaimR = 1 Then Check1.Value = 1 cr1 = "True" cr2 = "1" Else Check1.Value = 0 cr1 = "False" Computerized Inventory System for Akihabara Store 209
cr2 = "0" End If End If End Sub Private Sub Check1_Click() If Check1.Value = 1 Then cr1 = True cr2 = "1" Else cr1 = False cr2 = "0" End If End Sub Private Sub chkAccessS_Click() If chkAccessS.Value = 1 Then AccessS1 = True AccessS2 = "1" Else AccessS1 = False AccessS2 = "0" End If End Sub Private Sub chkAccount_Click() If chkAccount.Value = 1 Then account1 = True account2 = "1" Else account1 = False account2 = "0" End If End Sub Private Sub chkAuditR_Click() If chkAuditR.Value = 1 Then AuditR1 = True AuditR2 = "1" Else AuditR1 = False AuditR2 = "0" Computerized Inventory System for Akihabara Store 210
End If End Sub Private Sub chkCalc_Click() If chkCalc.Value = 1 Then Calc1 = True Calc2 = "1" Else Calc1 = False Calc2 = "0" End If End Sub Private Sub chkCancelR_Click() If chkCancelR.Value = 1 Then CancelR1 = True CancelR2 = "1" Else CancelR1 = False CancelR2 = "0" End If End Sub Private Sub chkChangeS_Click() If chkChangeS.Value = 1 Then ChangeS1 = True ChangeS2 = "1" Else ChangeS1 = False ChangeS2 = "0" End If End Sub Private Sub chkCritical_Click() If chkCritical.Value = 1 Then Critical1 = True Critical2 = "1" Else Critical1 = False Critical2 = "0" End If End Sub Computerized Inventory System for Akihabara Store 211
Private Sub chkCustomerI_Click() If chkCustomerI.Value = 1 Then CustomerI1 = True CustomerI2 = "1" Else CustomerI1 = False CustomerI2 = "0" End If End Sub Private Sub chkCustomerT_Click() If chkCustomerT.Value = 1 Then CustomerT1 = True CustomerT2 = "1" Else CustomerT1 = False CustomerT2 = "0" End If End Sub Private Sub chkCustomerU_Click() If chkCustomerU.Value = 1 Then CustomerU1 = True CustomerU2 = "1" Else CustomerU1 = False CustomerU2 = "0" End If End Sub Private Sub chkDatabaseU_Click() If chkDatabaseU.Value = 1 Then DatabaseU1 = True DatabaseU2 = "1" Else DatabaseU1 = False DatabaseU2 = "0" End If End Sub Private Sub chkExpensesR_Click() If chkExpensesR.Value = 1 Then ExpensesR1 = True Computerized Inventory System for Akihabara Store 212
ExpensesR2 = "1" Else ExpensesR1 = False ExpensesR2 = "0" End If End Sub Private Sub chkItemI_Click() If chkItemI.Value = 1 Then ItemI1 = True ItemI2 = "1" Else ItemI1 = False ItemI2 = "0" End If End Sub Private Sub chkItemR_Click() If chkItemR.Value = 1 Then ItemR1 = True ItemR2 = "1" Else ItemR1 = False ItemR2 = "0" End If End Sub Private Sub chkLockU_Click() If chkLockU.Value = 1 Then LockU1 = True LockU2 = "1" Else LockU1 = False LockU2 = "0" End If End Sub Private Sub chkNote_Click() If chkNote.Value = 1 Then Note1 = True Note2 = "1" Else Note1 = False Computerized Inventory System for Akihabara Store 213
Note2 = "0" End If End Sub Private Sub chkPendingR_Click() If chkPendingR.Value = 1 Then PendingR1 = True PendingR2 = "1" Else PendingR1 = False PendingR2 = "0" End If End Sub Private Sub chkPOSR_Click() If chkPOSR.Value = 1 Then POSR1 = True POSR2 = "1" Else POSR1 = False POSR2 = "0" End If End Sub Private Sub chkSupplierI_Click() If chkSupplierI.Value = 1 Then SupplierI1 = True SupplierI2 = "1" Else SupplierI1 = False SupplierI2 = "0" End If End Sub Private Sub chkSupplierT_Click() If chkSupplierT.Value = 1 Then SupplierT1 = True SupplierT2 = "1" Else SupplierT1 = False SupplierT2 = "0" End If End Sub Computerized Inventory System for Akihabara Store 214
Private Sub chkValidateS_Click() If chkValidateS.Value = 1 Then ValidateS1 = True ValidateS2 = "1" Else ValidateS1 = False ValidateS2 = "0" End If End Sub Private Sub cmdBack_Click() Unload Me frmMain.Show Call main(True) frmMain.Toolbar1.Visible = True If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Accessibility" rs!Desc = "Back" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdOk_Click() If cboUser = "" Then MsgBox "Please Select User" Else Call frame(True) cmdUpdate.Enabled = True If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Accessibility" Computerized Inventory System for Akihabara Store 215
rs!Desc = "OK button" rs!Date = Date rs!Time = Time rs.Update rs.Close End If End Sub Private Sub cmdUpdate_Click() If rs.State = 1 Then rs.Close rs.Open "Select * from tblAccess where Name = '" & cboUser & "'", db If rs.RecordCount <> 0 Then rs!mnuAccount = account1 rs!mnuCustomer = CustomerI1 rs!mnuSupplier = SupplierI1 rs!mnuItem = ItemI1 rs!mnuCustomer2 = CustomerT1 rs!mnuSupplier2 = SupplierT1 rs!mnuAudit = AuditR1 rs!mnuCancel = CancelR1 rs!mnuExpenses = ExpensesR1 rs!mnuItemStock = ItemR1 rs!mnuPOS = POSR1 rs!mnuPending = PendingR1 rs!mnuDatabase = DatabaseU1 rs!mnuCustomerRestore = CustomerU1 rs!mnuLock = LockU1 rs!mnuCalc = Calc1 rs!mnuNotepad = Note1 rs!mnuAccess = AccessS1 rs!mnuCP = ChangeS1 rs!mnuValid = ValidateS1 rs!mnuCritical = Critical1 rs!mnuClaimR = cr1 rs.Update Else rs.AddNew rs!Name = cboUser rs!mnuAccount = account1 rs!mnuCustomer = CustomerI1 rs!mnuSupplier = SupplierI1 Computerized Inventory System for Akihabara Store 216
rs!mnuItem = ItemI1 rs!mnuCustomer2 = CustomerT1 rs!mnuSupplier2 = SupplierT1 rs!mnuAudit = AuditR1 rs!mnuCancel = CancelR1 rs!mnuExpenses = ExpensesR1 rs!mnuItemStock = ItemR1 rs!mnuPOS = POSR1 rs!mnuPending = PendingR1 rs!mnuDatabase = DatabaseU1 rs!mnuCustomerRestore = CustomerU1 rs!mnuLock = LockU1 rs!mnuCalc = Calc1 rs!mnuNotepad = Note1 rs!mnuAccess = AccessS1 rs!mnuCP = ChangeS1 rs!mnuValid = ValidateS1 rs!mnuCritical = Critical1 rs!mnuClaimR = cr1 rs.Update End If If rs.State = 1 Then rs.Close rs.Open "Select * from tblAccessNo where Name = '" & cboUser & "'", db If rs.RecordCount <> 0 Then rs!mnuAccount = account2 rs!mnuCustomer = CustomerI2 rs!mnuSupplier = SupplierI2 rs!mnuItem = ItemI2 rs!mnuCustomer2 = CustomerT2 rs!mnuSupplier2 = SupplierT2 rs!mnuAudit = AuditR2 rs!mnuCancel = CancelR2 rs!mnuExpenses = ExpensesR2 rs!mnuItemStock = ItemR2 rs!mnuPOS = POSR2 rs!mnuPending = PendingR2 rs!mnuDatabase = DatabaseU2 rs!mnuCustomerRestore = CustomerU2 rs!mnuLock = LockU2 rs!mnuCalc = Calc2 rs!mnuNotepad = Note2 rs!mnuAccess = AccessS2 Computerized Inventory System for Akihabara Store 217
rs!mnuCP = ChangeS2 rs!mnuValid = ValidateS2 rs!mnuCritical = Critical2 rs!mnuClaimR = cr2 rs.Update Else rs.AddNew rs!Name = cboUser rs!mnuAccount = account2 rs!mnuCustomer = CustomerI2 rs!mnuSupplier = SupplierI2 rs!mnuItem = ItemI2 rs!mnuCustomer2 = CustomerT2 rs!mnuSupplier2 = SupplierT2 rs!mnuAudit = AuditR2 rs!mnuCancel = CancelR2 rs!mnuExpenses = ExpensesR2 rs!mnuItemStock = ItemR2 rs!mnuPOS = POSR2 rs!mnuPending = PendingR2 rs!mnuDatabase = DatabaseU2 rs!mnuCustomerRestore = CustomerU2 rs!mnuLock = LockU2 rs!mnuCalc = Calc2 rs!mnuNotepad = Note2 rs!mnuAccess = AccessS2 rs!mnuCP = ChangeS2 rs!mnuValid = ValidateS2 rs!mnuCritical = Critical2 rs!mnuClaimR = cr2 rs.Update End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Accessibility" rs!Desc = "Update button" rs!Date = Date rs!Time = Time rs.Update rs.Close Computerized Inventory System for Akihabara Store 218
MsgBox "Save" Call frame(False) cmdUpdate.Enabled = False End Sub Private Sub Form_Load() Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 'Call opendb 'pinasok = "Access" 'Call bukas Call frame(False) cmdUpdate.Enabled = False If rs.State = 1 Then rs.Close rs.Open "Select * from tblLogIn where Level = '" & "Cashier" & "'", db If rs.RecordCount <> 0 Then Do While rs.EOF <> True cboUser.AddItem rs!Name rs.MoveNext Loop End If rs.Close If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Accessibility" rs!Desc = "Form Load" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Account Info Private Sub cmdSave_Click() If rs.State = 1 Then rs.Close Computerized Inventory System for Akihabara Store 219
rs.Open "Select * from tblLogin where Name ='" & txtName & "'", db If rs.RecordCount <> 0 Then MsgBox "record already exist", vbOKOnly + vbInformation, "" rs.Close ElseIf txtUser = "" Then MsgBox "Field required", vbInformation, "User Account" txtUser.SetFocus ElseIf txtName = "" Then MsgBox "Field required", vbInformation, "User Account" txtName.SetFocus ElseIf txtPass = "" Then MsgBox "Field required", vbInformation, "User Account" txtPass.SetFocus ElseIf txtPass2 = "" Then MsgBox "Field required", vbInformation, "User Account" txtPass2.SetFocus ElseIf txtSecurity = "" Then MsgBox "Field required", vbInformation, "User Account" txtSecurity.SetFocus ElseIf 6 >= Len(txtPass) Then MsgBox "Maxium Letter or No. must be 6 higher", vbInformation, "User Account" txtPass = "" txtPass.SetFocus ElseIf (txtPass <> txtPass2) Then MsgBox "Your Password 1 and Password 2 dont match" txtPass = "" txtPass2 = "" txtPass.SetFocus Else rs.AddNew rs!UserName = txtUser rs!Name = txtName rs!Password = txtPass rs!Level = "Cashier" rs!Pin = txtSecurity rs.Update If rs.State = 1 Then rs.Close rs.Open "Select * from tblAccess ", db rs.AddNew rs!Name = txtName rs!mnuAccount = False rs!mnuCustomer = False Computerized Inventory System for Akihabara Store 220
rs!mnuSupplier = False rs!mnuItem = False rs!mnuCustomer2 = False rs!mnuSupplier2 = False rs!mnuAudit = False rs!mnuCancel = False rs!mnuExpenses = False rs!mnuItemStock = False rs!mnuPOS = False rs!mnuPending = False rs!mnuDatabase = False rs!mnuCustomerRestore = False rs!mnuLock = False rs!mnuCalc = False rs!mnuNotepad = False rs!mnuAccess = False rs!mnuCP = False rs!mnuValid = False rs!mnuCritical = False rs!mnuClaimR = False rs.Update If rs.State = 1 Then rs.Close rs.Open "Select * from tblAccessNo ", db rs.AddNew rs!Name = txtName rs!mnuCritical = "0" rs!mnuAccount = "0" rs!mnuCustomer = "0" rs!mnuSupplier = "0" rs!mnuItem = "0" rs!mnuCustomer2 = "0" rs!mnuSupplier2 = "0" rs!mnuAudit = "0" rs!mnuCancel = "0" rs!mnuExpenses = "0" rs!mnuItemStock = "0" rs!mnuPOS = "0" rs!mnuPending = "0" rs!mnuDatabase = "0" rs!mnuCustomerRestore = "0" rs!mnuLock = "0" rs!mnuCalc = "0" rs!mnuNotepad = "0" Computerized Inventory System for Akihabara Store 221
rs!mnuAccess = "0" rs!mnuCP = "0" rs!mnuValid = "0" rs!mnuCritical = "0" rs!mnuClaimR = "0" rs.Update MsgBox "New Record Added", vbInformation, "Save Record" txtUser = "" txtName = "" txtPass = "" txtSecurity = "" txtPass2 = "" Unload Me frmAccess.Show If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Account" rs!Desc = "Save Button" rs!Date = Date rs!Time = Time rs.Update rs.Close End If End Sub Private Sub cmdBack_Click() If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Account" rs!Desc = "Back Button" rs!Date = Date rs!Time = Time rs.Update rs.Close Unload Me frmMain.Show Call main(True) Computerized Inventory System for Akihabara Store 222
frmMain.Toolbar1.Visible = True End Sub Private Sub Form_Load() Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 Call opendb If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Account" rs!Desc = "Form Load" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub txtName_LostFocus() txtName = StrConv(txtName, vbProperCase) End Sub Private Sub txtUser_LostFocus() txtUser = StrConv(txtUser, vbProperCase) End Sub Change Pass Dim R As Integer Private Sub cmdBack_Click() If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Change Password" rs!Desc = "Back button" rs!Date = Date rs!Time = Time Computerized Inventory System for Akihabara Store 223
rs.Update rs.Close Unload Me frmMain.Show Call main(True) frmMain.Toolbar1.Visible = True End Sub Private Sub Form_Load() Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 Call opendb R=0
If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Change Password" rs!Desc = "Form Load" rs!Date = Date rs!Time = Time rs.Update rs.Close End Sub Private Sub cmdSave_Click() If rs.State = 1 Then rs.Close rs.Open "Select * from tblLogIn where Password = '" & txtOld & "' and Pin = '" & txtSecurity & "'", db If rs.RecordCount <> 0 Then If txtSecurity = "" Then MsgBox "P.lease type your Security Code", vbCritical, "Change Password" txtSecurity.SetFocus ElseIf txtOld = "" Then MsgBox "Please type your Old Password", vbCritical, "Change Password" txtOld.SetFocus ElseIf txtnew = "" Then MsgBox "Pease re type your New Password", vbCritical, "Change Password" Computerized Inventory System for Akihabara Store 224
txtnew.SetFocus ElseIf txtre = "" Then MsgBox "Pease re type your Re - Type Password", vbCritical, "Change Password" txtre.SetFocus ElseIf 6 >= Len(txtnew) Then MsgBox "Maxium Letter or No. must be 6 higher", vbInformation, "WBS" txtnew = "" txtnew.SetFocus ElseIf (txtnew = txtre) Then rs!Password = txtnew rs.Update MsgBox "Your new Password is save", vbInformation, "Change Password" txtSecurity = "" txtOld = "" txtnew = "" txtre = "" Unload Me frmMain.Enabled = True frmMain.Show ElseIf (txtnew <> txtre) Then MsgBox "Your password not match", vbCritical, "Change Password" txtnew = "" txtre = "" txtnew.SetFocus R=R+1 End If End If rs.Close If R = 3 Then MsgBox "You Enter three times in Valid Automatic Close", vbInformation, "Change Password" End If If rs.State = 1 Then rs.Close rs.Open "select * from tblAudit", db rs.AddNew rs!Name = frmMain.txtUser rs!Level = frmMain.txtlevel rs!Access = "Change Password" rs!Desc = " Save button" rs!Date = Date rs!Time = Time rs.Update Computerized Inventory System for Akihabara Store 225
rs.Close End Sub Private Sub cmdCancel_Click() If MsgBox("Do you want to exit?", vbQuestion + vbYesNo, "Change Password") = vbYes Then Unload Me frmMain.Enabled = True frmMain.Show Else txtOld = "" txtnew = "" txtre = "" txtOld.SetFocus End If End Sub
Date and Time Validation Dim sum As Integer Private Sub cmdBack_Click() Frame1.Visible = False Frame2.Visible = True End Sub Private Sub cmdFormat_Click() Frame1.Visible = True Frame2.Visible = False DTime = LTime DDate = LDate End Sub Private Sub cmdMain_Click() Unload Me frmMain.Show If rs.State = 1 Then rs.Close rs.Open "Select * from tblitem ", db Do While rs.EOF <> True If rs!qty <= 5 Then sum = sum + 1 Computerized Inventory System for Akihabara Store 226
End If rs.MoveNext Loop If 0 < sum Then frmCritical.Show Else Call main(True) frmMain.Toolbar1.Visible = True End If End Sub Private Sub cmdOk_Click() 'DDate = Date 'DTime = Time 'Frame2.Visible = True 'Frame1.Visible = False 'Unload Me 'frmCritical.Show Unload Me frmMain.Show If rs.State = 1 Then rs.Close rs.Open "Select * from tblitem ", db Do While rs.EOF <> True If rs!qty <= 5 Then sum = sum + 1 End If rs.MoveNext Loop If 0 < sum Then frmCritical.Show Else Call main(True) Toolbar1.Visible = True End If End Sub Private Sub Form_Load() Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 LDate = Date Computerized Inventory System for Akihabara Store 227
Microsoft Visual Basic 6.0. Visual Basic was designed to be easily learned and used by beginner programmers. The language not only allows programmers to create simple GUI applications, but can also develop complex applications. The proponent use Visual Basic to develop simple utilities or complicated applications. Data access features allow proponent to create databases, front-end applications, and scalable server-side components for most popular database formats
Microsoft Access is a relational database management system from Microsoft that combines the relational Microsoft Jet Database Engine with a graphical user interface and software-development tools. It is a member of the Microsoft Office suite of applications, included in the Professional and higher editions or sold separately. Access stores data in its own format based on the Access Jet Database Engine. It can also import or link directly to data stored in other applications and databases.
228
SQL often referred to as Structured Query Language, is a database computer language designed for managing data in relational database management systems (RDBMS), and originally based upon relational algebra and calculus. Its scope includes data insert, query, update and delete, schema creation and modification, and data access control.
Adobe Photoshop is a graphics editing program developed and published by Adobe Systems Incorporated.
Microsoft Word is a word processing program that allows users to create professional documents such as resumes, reports, legal documents, manuals, etc. it is efficient tool for the proponents to use this application in creating documents to make Users Manual.
6.0 System Testing Plan 7.1 Testing Stages This is the part to check the correctness of the inventory system. The proponents tested each module of the proposed system to search for possible errors. After checking for possible errors, the proponents performed debugging and error trapping to some modules.
229
7.2 Testing Schedule The proponents tested anything that could go wrong about the proposed system. The system was presented to the adviser for the checking and testing of the system.
7.0 System Implementation Plan 7.1 Resource Requirements 7.1.1 Hardware Requirements
Notebook Laptop Specification: 7.1.2 Processor N450 (1.66GHz, 512KB cache) Memory- 1GB memory Hard Disk Drive- 160GB
Software Requirements Operating System (Microsoft Windows 7) Microsoft Visual Basic 6.0 Microsoft Access 2007 Microsoft Word 2007 Microsoft PowerPoint 2007
7.1.3
The user should have knowledge about using computer to be able to use the Computerized Inventory System.
7.2 Implementation Plan 7.2.1 Site Preparation The proponents used Microsoft Visual Basic 6.0 as the programming software. The system will use a monitor for visualization of the system, a mouse, keyboard and a printer to print all the reports.
7.2.2
Personnel Training The proponents will conduct an actual demonstration of the system
and teach all the employees including the manager for more familiarization.
After the demonstration, the proponents will implement the capabilities of the proposed system.
7.2.3
System Conversion The proponents suggest that parallel run for about a month shall be conducted to
test the accuracy of the system before totally turning to the proposed system. With this way, they can easily distinguish the advantages of using this system.
7.2.4
Data Conversion
231
All the data needed to run this should be encoded as soon as the authorized user is trained. 7.2.5 Implementation Schedule The proponents acquired different resources in developing the system.The proponents use hardware and software that may be used in implementing the system so, that the system can be easily understood by the users.
232