📄 main.frm
字号:
VERSION 5.00
Begin VB.Form MAIN
BackColor = &H00400000&
BorderStyle = 0 'None
Caption = "Inventory Management System"
ClientHeight = 5385
ClientLeft = 150
ClientTop = 720
ClientWidth = 7575
ControlBox = 0 'False
LinkTopic = "Form2"
ScaleHeight = 5385
ScaleWidth = 7575
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
WindowState = 2 'Maximized
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "Soft. By Rajeev Dhawan"
ForeColor = &H00C0E0FF&
Height = 240
Left = 9960
TabIndex = 1
Top = 7500
Width = 1800
End
Begin VB.Label Label1
Alignment = 2 'Center
BackColor = &H00400000&
Caption = "D H E E R A J C O M M U N I C A T I O N S"
BeginProperty Font
Name = "MS Sans Serif"
Size = 18
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFC0C0&
Height = 390
Left = 60
TabIndex = 0
Top = 7410
Width = 11820
End
Begin VB.Image Image1
Height = 8175
Left = 15
Picture = "MAIN.frx":0000
Stretch = -1 'True
Top = 0
Width = 11865
End
Begin VB.Menu Accounts
Caption = "Accounts"
Begin VB.Menu sale_acc
Caption = "Accounts (Sale)"
End
Begin VB.Menu pur_acc
Caption = "Accounts (Purchase)"
End
End
Begin VB.Menu Stocks
Caption = "Stock"
Begin VB.Menu newItem
Caption = "New Item"
End
Begin VB.Menu item_change
Caption = "Changings"
End
Begin VB.Menu Stock_reg
Caption = "Stock Register"
End
End
Begin VB.Menu Purchases
Caption = "Purchase"
Begin VB.Menu Neew_purchase
Caption = "New Purchase"
End
Begin VB.Menu prev_pur_det
Caption = "Purchase Details"
End
End
Begin VB.Menu sales
Caption = "Sales"
Begin VB.Menu new_sale
Caption = "New Sale"
End
Begin VB.Menu sales_det
Caption = "Sales Detail"
End
End
Begin VB.Menu Reports
Caption = "&Reports"
Begin VB.Menu all_accts
Caption = "&All Accounts"
End
Begin VB.Menu Defaulters
Caption = "&Defaulters"
End
Begin VB.Menu sep1
Caption = "-"
End
Begin VB.Menu Stock_Details
Caption = "&Stock Detail"
End
Begin VB.Menu sep2
Caption = "-"
End
Begin VB.Menu today_DB
Caption = "Daily Sales Book (Today)"
End
Begin VB.Menu db_sp_date
Caption = "Daily Sales Book (Specific Date)"
End
Begin VB.Menu Db_all
Caption = "Complete Sales Record"
End
Begin VB.Menu pur_rep
Caption = "Sales Report"
End
Begin VB.Menu sep5
Caption = "-"
End
Begin VB.Menu today_p_book
Caption = "Daily Purchase Book (Today)"
End
Begin VB.Menu dail_pur_book
Caption = "Daily Purchase Book (Specific Date)"
End
Begin VB.Menu daily_pur_book_all
Caption = "Complete Purchase Record"
End
Begin VB.Menu purc_rep
Caption = "Purchase Report"
End
Begin VB.Menu sdp
Caption = "sdp"
Visible = 0 'False
End
Begin VB.Menu sd
Caption = "sd"
Visible = 0 'False
End
Begin VB.Menu datesp
Caption = "datesp"
Visible = 0 'False
End
Begin VB.Menu dates
Caption = "dates"
Visible = 0 'False
End
End
Begin VB.Menu ch_pass
Caption = "Change Password"
End
Begin VB.Menu aboutus
Caption = "About us"
End
Begin VB.Menu Exit
Caption = "Exit"
End
End
Attribute VB_Name = "MAIN"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Private Sub aboutus_Click()
frmAbout.Show
End Sub
Private Sub all_accts_Click()
cn.ConnectionString = "Provider=MSDASQL.1;Password=;Persist Security Info=True;User ID=Admin;Data Source=relience"
cn.CursorLocation = adUseClient
cn.Open
mysql = "delete from temp_accounts"
cn.Execute mysql
mysql = "insert into temp_accounts select * from accounts"
cn.Execute mysql
'cn.CommitTrans
cn.Close
DataEnvironment1.Connection1.Open
DataEnvironment1.Command1
DataReport1.WindowState = 2
DataReport1.Show
End Sub
Private Sub Command1_Click()
Form1.Show
Me.Enabled = False
End Sub
Private Sub Command2_Click()
Stock.Show
Me.Enabled = False
End Sub
Private Sub Command3_Click()
Form2.Show
Me.Enabled = False
End Sub
Private Sub Command4_Click()
Purchase.Show
Me.Enabled = False
End Sub
Private Sub Command5_Click()
Form3.Show
Me.Enabled = False
End Sub
Private Sub ch_pass_Click()
Form6.Show
Me.Enabled = False
End Sub
Private Sub dail_pur_book_Click()
Dim s As String
s = InputBox("Enter Date of Transaction", "Sales Report", Date)
Call clear_temp_trans_pur
cn.ConnectionString = "Provider=MSDASQL.1;Password=;Persist Security Info=True;User ID=Admin;Data Source=relience"
cn.CursorLocation = adUseClient
cn.Open
mysql = "insert into temp_trans_pur select * from trans_pur where date = cdate('" + s + "')"
cn.Execute mysql
'cn.CommitTrans
cn.Close
DataEnvironment1.Connection1.Open
DataEnvironment1.Command5_Grouping
DataReport6.WindowState = 2
DataReport6.Show
End Sub
Private Sub daily_pur_book_all_Click()
Call clear_temp_trans_pur
cn.ConnectionString = "Provider=MSDASQL.1;Password=;Persist Security Info=True;User ID=Admin;Data Source=relience"
cn.CursorLocation = adUseClient
cn.Open
mysql = "insert into temp_trans_pur select * from trans_pur"
cn.Execute mysql
'cn.CommitTrans
cn.Close
DataEnvironment1.Connection1.Open
DataEnvironment1.Command5_Grouping
DataReport6.WindowState = 2
DataReport6.Show
End Sub
Public Sub dates_Click()
cn.ConnectionString = "Provider=MSDASQL.1;Password=;Persist Security Info=True;User ID=Admin;Data Source=relience"
cn.CursorLocation = adUseClient
cn.Open
mysql = "delete from temp_trans"
cn.Execute mysql
mysql = "insert into temp_trans select * from trans where date>= cdate('" + sp_date1 + "') and date <= cdate('" + sp_date2 + "')"
cn.Execute mysql
cn.Close
DataEnvironment1.Connection1.Open
DataEnvironment1.Command4_Grouping
DataReport4.WindowState = 2
DataReport4.Show
End Sub
Public Sub datesp_Click()
cn.ConnectionString = "Provider=MSDASQL.1;Password=;Persist Security Info=True;User ID=Admin;Data Source=relience"
cn.CursorLocation = adUseClient
cn.Open
mysql = "delete from temp_trans_pur"
cn.Execute mysql
mysql = "insert into temp_trans_pur select * from trans where date>= cdate('" + sp_date1 + "') and date <= cdate('" + sp_date2 + "')"
cn.Execute mysql
cn.Close
DataEnvironment1.Connection1.Open
DataEnvironment1.Command5_Grouping
DataReport6.WindowState = 2
DataReport6.Show
End Sub
Private Sub Db_all_Click()
Call clear_temp_trans
cn.ConnectionString = "Provider=MSDASQL.1;Password=;Persist Security Info=True;User ID=Admin;Data Source=relience"
cn.CursorLocation = adUseClient
cn.Open
mysql = "insert into temp_trans select * from trans"
cn.Execute mysql
'cn.CommitTrans
cn.Close
DataEnvironment1.Connection1.Open
DataEnvironment1.Command4_Grouping
DataReport4.WindowState = 2
DataReport4.Show
End Sub
Public Sub db_sp_date_Click()
Dim s As String
s = InputBox("Enter Date of Transaction", "Sales Report", Date)
Call clear_temp_trans
cn.ConnectionString = "Provider=MSDASQL.1;Password=;Persist Security Info=True;User ID=Admin;Data Source=relience"
cn.CursorLocation = adUseClient
cn.Open
mysql = "insert into temp_trans select * from trans where date = cdate('" + s + "')"
cn.Execute mysql
'cn.CommitTrans
cn.Close
DataEnvironment1.Connection1.Open
DataEnvironment1.Command4_Grouping
DataReport4.WindowState = 2
DataReport4.Show
End Sub
Private Sub Defaulters_Click()
cn.ConnectionString = "Provider=MSDASQL.1;Password=;Persist Security Info=True;User ID=Admin;Data Source=relience"
cn.CursorLocation = adUseClient
cn.Open
mysql = "delete from temp_accounts"
cn.Execute mysql
mysql = "insert into temp_accounts select * from accounts where balance>0"
cn.Execute mysql
'cn.CommitTrans
cn.Close
DataEnvironment1.Connection1.Open
DataEnvironment1.Command1
DataReport1.WindowState = 2
DataReport1.Show
End Sub
Private Sub Exit_Click()
Dim a As Integer
a = MsgBox("Wish To End the Session?", vbYesNo + vbExclamation, "Confirm...")
If a = vbYes Then
End
End If
End Sub
Private Sub Form_Activate()
Image1.Width = Me.ScaleWidth
Image1.Height = Me.ScaleHeight
Label1.Left = 0
Label1.Width = Me.ScaleWidth
End Sub
Private Sub item_change_Click()
Me.Enabled = False
Form4.Show
End Sub
Private Sub Neew_purchase_Click()
purcg.Show
Me.Enabled = False
End Sub
Private Sub new_sale_Click()
saleg.Show
Me.Enabled = False
End Sub
Private Sub newItem_Click()
Me.Enabled = False
Stock.Show
End Sub
Private Sub prev_pur_det_Click()
Call today_p_book_Click
End Sub
Private Sub pur_acc_Click()
accp.Show
Me.Enabled = False
End Sub
Private Sub Pur_rep_Click()
Form2.Show
End Sub
Private Sub purc_rep_Click()
Form2_p.Show
End Sub
Private Sub sale_acc_Click()
Me.Enabled = False
Form1.Show
End Sub
Private Sub sales_det_Click()
Call today_DB_Click
End Sub
Public Sub sd_Click()
cn.ConnectionString = "Provider=MSDASQL.1;Password=;Persist Security Info=True;User ID=Admin;Data Source=relience"
cn.CursorLocation = adUseClient
cn.Open
mysql = "delete from temp_trans"
cn.Execute mysql
mysql = "insert into temp_trans select * from trans where ac_name ='" + ac_name + "'"
cn.Execute mysql
cn.Close
DataEnvironment1.Connection1.Open
DataEnvironment1.Command3_Grouping
DataReport5.WindowState = 2
DataReport5.Show
End Sub
Private Sub sdp_Click()
cn.ConnectionString = "Provider=MSDASQL.1;Password=;Persist Security Info=True;User ID=Admin;Data Source=relience"
cn.CursorLocation = adUseClient
cn.Open
mysql = "delete from temp_trans_pur"
cn.Execute mysql
mysql = "insert into temp_trans_pur select * from trans_pur where ac_name ='" + ac_name + "'"
cn.Execute mysql
cn.Close
DataEnvironment1.Connection1.Open
DataEnvironment1.Command6_Grouping
DataReport7.WindowState = 2
DataReport7.Show
End Sub
Private Sub Stock_reg_Click()
Me.Enabled = False
Form5.Show
End Sub
Private Sub Stock_Details_Click()
cn.ConnectionString = "Provider=MSDASQL.1;Password=;Persist Security Info=True;User ID=Admin;Data Source=relience"
cn.CursorLocation = adUseClient
cn.Open
mysql = "delete from temp_stock"
cn.Execute mysql
mysql = "insert into temp_stock select * from stock"
cn.Execute mysql
'cn.CommitTrans
cn.Close
DataEnvironment1.Connection1.Open
DataEnvironment1.Command2_Grouping
DataReport2.WindowState = 2
DataReport2.Show
End Sub
Private Sub today_DB_Click()
Call clear_temp_trans
cn.ConnectionString = "Provider=MSDASQL.1;Password=;Persist Security Info=True;User ID=Admin;Data Source=relience"
cn.CursorLocation = adUseClient
cn.Open
mysql = "insert into temp_trans select * from trans where date =cdate('" + Str(Date) + "')"
cn.Execute mysql
'cn.CommitTrans
cn.Close
DataEnvironment1.Connection1.Open
DataEnvironment1.Command4_Grouping
DataReport4.WindowState = 2
DataReport4.Show
End Sub
Private Sub today_p_book_Click()
Call clear_temp_trans_pur
cn.ConnectionString = "Provider=MSDASQL.1;Password=;Persist Security Info=True;User ID=Admin;Data Source=relience"
cn.CursorLocation = adUseClient
cn.Open
mysql = "insert into temp_trans_pur select * from trans_pur where date =cdate('" + Str(Date) + "')"
cn.Execute mysql
'cn.CommitTrans
cn.Close
DataEnvironment1.Connection1.Open
DataEnvironment1.Command5_Grouping
DataReport6.WindowState = 2
DataReport6.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -