Idea Transcript
SlideShare Explore Search You
Upload Login Signup
Search
Submit Search
Home Explore Presentation Courses PowerPoint Courses by LinkedIn Learning Search Successfully reported this slideshow. We use your LinkedIn profile and activity frmadd.Show (1) End Sub Private Submenulogin_Click() If menulogin.Caption="Login"Then frmlogi... End Sub Private Submenupdateitem_Click() frmupdate.Listview1.Visible =True frmupdate.Frame1.Visible =True frmupdate.Frame2... Private Submenureport_Click() frmreport.Show End Sub Private Submenusup_Click() FRMVIEW.Frame1.Visible =False FRMVIEW.Fram... Private Submenuupdatesupplier_Click() frmupdate.Listview1.Visible =False frmupdate.Frame1.Visible =False frmupdate.Frame2.... Add Form Code Private SubCommand1_Click() UnloadMe End Sub Private SubCommand2_Click() UnloadMe End Sub Private SubCommand... db.Openstrcon Setrs = db.Execute(strsql) strsql = "insertintotblbrand(brand_name,brand_specs) values('"& TXTBRAND& "','" &... Call MsgBox("One New Supplierhasbeenadded", vbInformation+vbExclamation,"Success") txtnameofsupplier.Text="" txtaddress.Te... End With WithFrame2 .Top = (frmadd.Height - .Height) /2 .Left= (frmadd.Width - .Width) /2 End With End Sub Subburahin() TX... Set rs = db.Execute(strsql) db.Close Form_Load Call MsgBox("One Then Command3.Enabled=False Command5.Enab... strsql = "select*from tblproduct" db.Openstrcon Setrs = db.Execute(strsql) If rs.BOF = False Andrs.EOF = False Then Me.Lis... If rs.BOF = False Andrs.EOF = False Then Me.ListView2.ListItems.Clear While Notrs.EOF= True WithMe.ListView2.ListItems.Add... Text2.Text= "" End Sub FormUser Update Private Subcmdclose_Click(Index AsInteger) UnloadMe End Sub Private SubCommand1_Cli... End If End Sub Private SubCommand2_Click(Index AsInteger) UnloadMe End Sub Private SubCommand3_Click() UnloadMe End Sub Pr... t2 = "" t3 = "" t4 = "" t5 = "" t6 = "" End If End If End Sub Private SubForm_Load() strsql = "select*from tblemployeedeta... End If db.Close Withfrmuserupdate .Top = (Screen.Height - .Height) /2 .Left= (Screen.Width - .Width) /2 End With WithFrame... Private SubListView1_DblClick() t1 = Me.Listview1.SelectedItem.Text t2 = Me.Listview1.SelectedItem.SubItems(1) t3 = Me.Lis... .SubItems(3) =rs(3) .SubItems(4) =rs(4) .SubItems(5) =rs(5) rs.MoveNext EndWith Wend Else MsgBox "no itemfound" End If db.... WithMe.Listview1.ListItems.Add .Text= rs(0) .SubItems(1) =rs(1) .SubItems(2) =rs(2) .SubItems(3) =rs(3) .SubItems(4) =rs(4... Private SubCommand1_Click() frmreciept.PrintForm End Sub Private SubCommand2_Click() UnloadMe End Sub Private SubForm_Load... End Sub FormQuantity codes: Publictotaldamage AsString PublictquanAsInteger PublictotAs String Private SubCommand1_Click()... Dimquan1 AsString quan1= Val(frmpurchase.quan) - Val(Text1.Text) X= totaldamage totaldamage =tot totaldamage =Val(totaldam... End Sub Private SubCommand2_Click() UnloadMe End Sub Private SubCommand3_Click() UnloadMe End Sub Private SubForm_Load() W... End Sub FormPayment codes: Dimsubra As Integer Dimbago As Integer Publicsukli,cash,vatAsInteger Private SubCommand1_Click(... Setrs = db.Execute(strsql) db.Close strsql = "select*from tblproduct" db.Openstrcon Setrs = db.Execute(strsql) subra = rs(... UnloadMe End Sub Private SubForm_Load() Withfrmpayment .Top = (Screen.Height - .Height) /2 .Left= (Screen.Width - .Width) ... Submain() strcon = "Provider=Microsoft.Jet.OLEDB.4.0;& id frmmain.menutransaction.Enabled=True frmmain.menufile.Enabled=True frmmain.menuclose.Enabled=True frmmain.menupdateitem.Enabled=False frmmain.menuupdate.Enabled=False frmmain.menuprint.Enabled=False frmmain.menuadd.Enabled=False frmmain.menuview.Enabled=True frmmain.menuupadteuser.Enabled=False frmmain.menuclose.Enabled=True frmmain.menucreate.Enabled=False frmmain.menureport.Enabled=False id = rs(0) idd= rs(2) db.Close Unload Me 34. 34. Call MsgBox("Acessgaranteed.."&"welcome "&id,vbInformation,"Accesstobb inventorysystem") MsgBox "Welcome Back" & id frmmain.menuclose.Caption="logout" frmmain.Text4.Text="" & id frmmain.Text1.Text="" & idd frmmain.Text3.Text="" & Date frmmain.Text2.Text="" & Time frmmain.Frame1.Visible =True frmmain.menulogin.Caption="Systemisusedby"& id frmmain.menulogin.Enabled=False uname = id Else db.Close Text1 = "" Text2 = "" Call MsgBox("Sorrythe Invalidaccount",vbcrittical,"Invalid") Text1.SetFocus End If If idd = "admin"Or id= "admin"Then Call MsgBox("welcome administrator..",vbInformation,"adminlogin") frmmain.menufile.Enabled=True frmmain.menupurchase.Enabled=True frmmain.menusecurity.Enabled=True frmmain.menutransaction.Enabled=True frmmain.menuclose.Enabled=True 35. 35. frmmain.menupdateitem.Enabled=True frmmain.menuupdate.Enabled=True frmmain.menuprint.Enabled=True frmmain.menuadd.Enabled=True frmmain.menuview.Enabled=True frmmain.menuupadteuser.Enabled=True frmmain.menuclose.Enabled=True frmmain.menucreate.Enabled=True frmmain.menureport.Enabled=True End If strsql = "insertintotbltimelog(time_login,position_type,date_login,username) values('" & Time & "','" & idd& "','" & Date & "','" & uname & "')" db.Openstrcon Setrs = db.Execute(strsql) db.Close End Sub Private SubCommand2_Click() UnloadMe End Sub Private SubForm_Load() Withfrmlogin .Top = (Screen.Height - .Height) /2 .Left= (Screen.Width - .Width) /2 End With 36. 36. End Sub Private SubText1_Click() Text1.Text= "" End Sub Main Form Code Dimtitle,titledanceAsString Dimtout As Integer Dimcountertitle AsInteger Private Sub Command1_Click() Me.Frame1.Visible =False End Sub Private SubCommand2_Click() Me.Frame2.Visible =False End Sub Private SubForm_Load() menuupadteuser.Enabled=False menuadd.Enabled=False menuupdate.Enabled=False menuview.Enabled=False menufile.Enabled=False menutransaction.Enabled=False 37. 37. menucreate.Enabled=False frmmain.menureport.Enabled=False title = "BROTHER BURGER SALES ANDINVENTORYSYSTEMV1.2 BY: ITP22PM" End Sub Private SubForm_Unload(Cancel AsInteger) If MsgBox("Are yousure youwant to close the application", vbQuestion+vbYesNo,"CLOSE") =vbYesThen Unload Me Else frmmain.Refresh End If End Sub Private SubLabel1_Click() End Sub Private SubFrame2_DragDrop(Source AsControl,XAsSingle,Y As Single) End Sub Private Submenuclose_Click() If menuclose.Caption="Close"Then If MsgBox("Are yousure youwantto close the application", vbQuestion+vbYesNo,"CLOSE") =vbYesThen 38. 38. tout= Val(Text3.Text) strsql = "insertintotbltimelog(time_logout) values('"& Val(Text3.Text) &"')" db.Openstrcon Setrs = db.Execute(strsql) db.Close UnloadMe End If Else If MsgBox("Are yousure youwantto LOGOFF",vbQuestion+ vbYesNo,"LOGOFF") =vbYesThen UnloadMe End If End If End Sub Private Submenucreate_Click() frmuserupdate.Caption="Create A New Account" frmuserupdate.Frame2.Visible =False frmuserupdate.Frame1.Visible =True frmuserupdate.Show (1) End Sub Private Submenuitem_Click() frmadd.Frame1.Visible =True frmadd.Frame2.Visible =False 39. 39. frmadd.Caption="Addnew Item" frmadd.Show (1) End Sub Private Submenulogin_Click() If menulogin.Caption="Login"Then frmlogin.Show(1) Else If MsgBox("Are yousure do youwan't to Log-off ?", vbQuestion+vbYesNo,"Logoff")=vbYesThen Form_Load menulogin.Caption="Login" menutransaction.Enabled=False menuclose.Caption="Close" If menulogin.Caption="logout"Then If MsgBox("Are yousure youwantto close the application", vbQuestion+vbYesNo,"CLOSE") =vbYesThen UnloadMe End If Else If MsgBox("Are yousure youwantto LOGOFF",vbQuestion+ vbYesNo,"LOGOFF") =vbYesThen UnloadMe End If End If End If End If 40. 40. End Sub Private Submenupdateitem_Click() frmupdate.Listview1.Visible =True frmupdate.Frame1.Visible =True frmupdate.Frame2.Visible =False frmupdate.Show(1) End Sub Private Submenuprint_Click() frmreport.PrintForm UnloadMe End Sub Private Submenuprod_Click() FRMVIEW.Frame1.Visible =True FRMVIEW.Frame2.Visible =False FRMVIEW.Show (1) End Sub Private Submenupurchase_Click() frmpurchase.Show (1) End Sub 41. 41. Private Submenureport_Click() frmreport.Show End Sub Private Submenusup_Click() FRMVIEW.Frame1.Visible =False FRMVIEW.Frame2.Visible =True FRMVIEW.Show (1) End Sub Private Submenusupplier_Click() frmadd.Caption="Addnew Supplier" frmadd.Frame1.Visible =False frmadd.Frame2.Visible =True frmadd.Show (1) End Sub Private Submenuupadteuser_Click() frmuserupdate.Caption="Update Personal Information" frmuserupdate.Frame2.Visible =True frmuserupdate.Frame1.Visible =False frmuserupdate.Show (1) End Sub 42. 42. Private Submenuupdatesupplier_Click() frmupdate.Listview1.Visible =False frmupdate.Frame1.Visible =False frmupdate.Frame2.Visible =True frmupdate.Show(1) End Sub Private Submenuus_Click() frmquan.Show frmquan.Frame2.Visible =True frmquan.Frame1.Visible =False frmquan.Caption="AboutUs." End Sub Private SubTimer1_Timer() titledance =Left(title,countertitle) Me.Caption= titledance countertitle =countertitle+1 If countertitle >=Len(title) +3 Then countertitle =1 titledance ="" End If End Sub 43. 43. Add Form Code Private SubCommand1_Click() UnloadMe End Sub Private SubCommand2_Click() UnloadMe End Sub Private SubCommand3_Click() If TXTBRAND = "" Or TXTPRODUCTID= "" Or TXTPRODUCTNAME = "" Or TXTBRANDSPECS= "" Or TXTUNITPRICE= "" Or TXTQUANTITY = "" Then Call MsgBox("Pleasefillupthe all fields") Else Dim NYMAs String NYM = InputBox("Pleaseenterthe SupplierID","SUPPLIER INFO") If Len(NYM) Val(frmpurchase.Listview1.SelectedItem.SubItems(4)) Then Call MsgBox("Sorrythe requestnumberof itemisnotvalid",vbInformation, "Notification") UnloadMe Else totaldamage =frmpurchase.daya tot= Val(Text1.Text) *Val(frmpurchase.unitd) tquan= Val(Text1.Text) Withfrmpurchase.ListView2.ListItems.Add .Text= frmpurchase.id .SubItems(1) =frmpurchase.prod .SubItems(2) =Text1.Text .SubItems(3) =tot EndWith DimX AsString 74. Dimquan1 AsString quan1= Val(frmpurchase.quan) - Val(Text1.Text) X= totaldamage totaldamage =tot totaldamage =Val(totaldamage) +Val(X) frmpurchase.daya=totaldamage frmpurchase.Label1.Caption="Nettotal:"& totaldamage frmpurchase.Txtno.Text="" & totaldamage strsql = "insertintotblpurchaseorder (order_id,supplier_id,totalamount,purchase_date) values('"&frmpurchase.id&"','"& frmpurchase.prod&"','" & totaldamage &"','" & Date & "')" db.Openstrcon ' Setrs = db.Execute(strsql) strsql = "update tblproductsetproduct_availability='"&quan1 & "'where product_id="& frmpurchase.id&"" db.Close totaldamage ="" frmpurchase.ilagay Text1.Text="" & totaldamage frmpurchase.Command2.Enabled=True frmpurchase.Command3.Enabled=True frmpurchase.Command4.Enabled=True frmpurchase.Command7.Enabled=False UnloadMe End If End If 75. End Sub Private SubCommand2_Click() UnloadMe End Sub Private SubCommand3_Click() UnloadMe End Sub Private SubForm_Load() Withfrmquan .Top = (Screen.Height - .Height) /2 .Left= (Screen.Width - .Width) /2 End With End Sub Private SubFrame2_DragDrop(Source AsControl,XAsSingle,YAsSingle) End Sub Private SubText1_Click() Text1.Text= "" 76. End Sub FormPayment codes: Dimsubra As Integer Dimbago As Integer Publicsukli,cash,vatAsInteger Private SubCommand1_Click() If Val(frmpurchase.daya)