📄 frmdespatch.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form frmDespatch
Caption = "Jute Despatch"
ClientHeight = 6390
ClientLeft = 60
ClientTop = 450
ClientWidth = 9690
KeyPreview = -1 'True
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 6390
ScaleWidth = 9690
WindowState = 2 'Maximized
Begin VB.CommandButton cmdSave
Caption = "Save"
Height = 375
Left = 9840
TabIndex = 26
Top = 1920
Width = 1095
End
Begin VB.CommandButton cmdDel
Caption = "Delete"
Height = 375
Left = 6000
TabIndex = 25
Top = 5760
Width = 1215
End
Begin VB.CommandButton cmdClose
Caption = "Close"
Height = 375
Left = 7440
TabIndex = 24
Top = 5760
Width = 1215
End
Begin VB.TextBox txtkg
DataField = "kg"
Height = 285
Left = 8055
TabIndex = 23
Top = 1950
Width = 1485
End
Begin VB.TextBox txtunit
DataField = "unit"
Height = 285
Left = 8055
TabIndex = 21
Top = 1560
Width = 1485
End
Begin VB.TextBox txtqnty
DataField = "qnty"
Height = 285
Left = 8055
TabIndex = 19
Top = 1185
Width = 1485
End
Begin VB.TextBox txticode
DataField = "icode"
Height = 285
Left = 8055
TabIndex = 17
Top = 810
Width = 1485
End
Begin VB.TextBox txtorderby
DataField = "orderby"
Height = 285
Left = 4215
TabIndex = 15
Top = 1950
Width = 2475
End
Begin VB.TextBox txtlorryno
DataField = "lorryno"
Height = 285
Left = 4215
TabIndex = 13
Top = 1560
Width = 2475
End
Begin VB.TextBox txtgodown
DataField = "godown"
Height = 285
Left = 4215
TabIndex = 11
Top = 1185
Width = 330
End
Begin VB.TextBox txtParty
DataField = "Party"
Height = 285
Left = 4215
TabIndex = 9
Top = 810
Width = 2535
End
Begin VB.TextBox txtmark
DataField = "mark"
Height = 285
Left = 1455
TabIndex = 7
Top = 1950
Width = 1515
End
Begin VB.TextBox txtstation
DataField = "station"
Height = 285
Left = 1455
TabIndex = 5
Top = 1560
Width = 1515
End
Begin VB.TextBox txtchno
DataField = "chno"
Height = 285
Left = 1455
TabIndex = 3
Top = 1185
Width = 1515
End
Begin VB.TextBox txtddate
DataField = "ddate"
Height = 285
Left = 1455
TabIndex = 1
Top = 810
Width = 1515
End
Begin MSDataGridLib.DataGrid DataGrid1
Height = 2415
Left = 720
TabIndex = 27
Top = 3120
Width = 9615
_ExtentX = 16960
_ExtentY = 4260
_Version = 393216
AllowUpdate = 0 'False
ForeColor = 128
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 1320
Top = 5640
Visible = 0 'False
Width = 2775
_ExtentX = 4895
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label Label1
Alignment = 2 'Center
BackColor = &H00000000&
Caption = "Jute Despatch"
BeginProperty Font
Name = "Times New Roman"
Size = 14.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 375
Left = 720
TabIndex = 28
Top = 120
Width = 9615
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Kg :"
Height = 195
Index = 11
Left = 7740
TabIndex = 22
Top = 1950
Width = 285
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Unit :"
Height = 195
Index = 10
Left = 7650
TabIndex = 20
Top = 1560
Width = 375
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Qnty. :"
Height = 195
Index = 9
Left = 7560
TabIndex = 18
Top = 1185
Width = 465
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Item Code :"
Height = 195
Index = 8
Left = 7215
TabIndex = 16
Top = 810
Width = 810
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Order By :"
Height = 195
Index = 7
Left = 3435
TabIndex = 14
Top = 1950
Width = 750
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Lorry No. :"
Height = 195
Index = 6
Left = 3450
TabIndex = 12
Top = 1560
Width = 735
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Godown :"
Height = 195
Index = 5
Left = 3495
TabIndex = 10
Top = 1185
Width = 690
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Despatch To :"
Height = 195
Index = 4
Left = 3165
TabIndex = 8
Top = 810
Width = 1020
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Mark :"
Height = 195
Index = 3
Left = 975
TabIndex = 6
Top = 1950
Width = 450
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Station :"
Height = 195
Index = 2
Left = 870
TabIndex = 4
Top = 1560
Width = 585
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Challan No. :"
Height = 195
Index = 1
Left = 510
TabIndex = 2
Top = 1185
Width = 915
End
Begin VB.Label lblFieldLabel
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Date:"
Height = 195
Index = 0
Left = 1035
TabIndex = 0
Top = 810
Width = 390
End
End
Attribute VB_Name = "frmDespatch"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub cmdDel_Click()
On Error GoTo errh
If MsgBox("Are you sure to delete ?", vbYesNo) = vbYes Then
Adodc1.Recordset.Delete
Adodc1.Refresh
MsgBox "Entry Removed", vbInformation
End If
Exit Sub
errh:
MsgBox Err.Description, vbCritical
End Sub
Private Sub cmdSave_Click()
OpenDb
On Error GoTo errh
env.con.Execute ("insert into tdespatch values('" & txtddate.Text & "','" & txtchno.Text & "','" & txtstation.Text & "','" & txtmark.Text & "','" & txtParty.Text & "','" & txtgodown.Text & "','" & txtlorryno.Text & "','" & _
txtorderby.Text & "','" & txticode.Text & "'," & txtqnty.Text & ",'" & txtunit.Text & "'," & txtkg.Text & ")")
Adodc1.Refresh
MsgBox "Entry Saved", vbInformation
txtgodown.SetFocus
SendKeys "{home}+{end}"
Exit Sub
errh:
MsgBox Err.Description, vbCritical
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = 27 Then
Unload Me
End If
If KeyAscii = 13 Then
SendKeys "{tab}"
SendKeys "{home}+{end}"
End If
End Sub
Private Sub Form_Load()
Adodc1.ConnectionString = env.con.ConnectionString
Adodc1.RecordSource = "select * from tdespatch"
Set DataGrid1.DataSource = Adodc1
Adodc1.Refresh
End Sub
Private Sub txticode_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
FillItemList txticode, txticode.Text
txticode.Text = SelectedItemCode
SendKeys "{tab}"
SendKeys "{home}+{end}"
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -