📄 rkgl.frm
字号:
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
ColumnWidth = 2085.166
EndProperty
BeginProperty Column01
ColumnWidth = 2085.166
EndProperty
BeginProperty Column02
ColumnWidth = 2085.166
EndProperty
BeginProperty Column03
ColumnWidth = 1365.165
EndProperty
BeginProperty Column04
ColumnWidth = 2085.166
EndProperty
BeginProperty Column05
ColumnWidth = 2085.166
EndProperty
BeginProperty Column06
ColumnWidth = 2085.166
EndProperty
BeginProperty Column07
ColumnWidth = 1365.165
EndProperty
EndProperty
End
End
Begin MSDataGridLib.DataGrid DataGrid2
Bindings = "rkgl.frx":046C
Height = 975
Left = 4320
TabIndex = 0
Top = 3960
Visible = 0 'False
Width = 2055
_ExtentX = 3625
_ExtentY = 1720
_Version = 393216
HeadLines = 1
RowHeight = 15
FormatLocked = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 3
BeginProperty Column00
DataField = "代码"
Caption = "代码"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
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 = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column02
DataField = "单位"
Caption = "单位"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
ColumnWidth = 2085.166
EndProperty
BeginProperty Column01
ColumnWidth = 2085.166
EndProperty
BeginProperty Column02
ColumnWidth = 1365.165
EndProperty
EndProperty
End
Begin MSAdodcLib.Adodc Adodc2
Height = 330
Left = 2520
Top = 5820
Visible = 0 'False
Width = 1215
_ExtentX = 2143
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=\ltgl\ltgl.mdb"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=\ltgl\ltgl.mdb"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "spsz"
Caption = "Adodc2"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 1320
Top = 5820
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=\ltgl\ltgl.mdb"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=\ltgl\ltgl.mdb"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "rkgl"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function SetWindowPos Lib "user32" (ByVal h%, ByVal hb%, ByVal x%, ByVal y%, ByVal cx%, ByVal cy%, ByVal f%) As Integer
Private Const SWP_NOMOVE = 2
Private Const SWP_NOSIZE = 1
Private Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Private Const HWND_TOPMOST = -1
Private Const HWND_NOTOPMOST = -2
Private Sub Combo1_Click(Area As Integer)
Text4.Text = Combo1.BoundText
End Sub
Private Sub Combo1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
KeyAscii = 0
SendKeys "{TAB}"
End If
End Sub
Private Sub Command1_Click()
If Command1.Caption = "增加" Then
Command1.Caption = "保存"
Command3.Enabled = False
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Combo1.Text = ""
Else
If Len(Text1.Text) <> 0 Then
Command1.Caption = "增加"
Command3.Enabled = True
Adodc1.Recordset.AddNew
Adodc1.Recordset("商品名称") = Combo1.Text
Adodc1.Recordset("型号") = Text1.Text
Adodc1.Recordset("单价") = Text2.Text
Adodc1.Recordset("数量") = Text3.Text
Adodc1.Recordset("单位") = Text4.Text
Adodc1.Recordset("总金额") = Text5.Text
Adodc1.Recordset("入库日期") = DTPicker1.Value
Adodc1.Recordset("经办人") = Text6.Text
Adodc1.Recordset.Update
Else
MsgBox "数据不能为空,请输入数据!"
End If
End If
End Sub
Private Sub Command2_Click()
Unload Form3
End Sub
Private Sub Command3_Click()
If Len(Text6.Text) <> 0 And Len(Combo1.Text) <> 0 And Len(Text4.Text) <> 0 Then
aa = MsgBox("真的要修改该商品吗?", 1, "消息")
If aa = 1 Then
Adodc1.Recordset("商品名称") = Combo1.Text
Adodc1.Recordset("型号") = Text1.Text
Adodc1.Recordset("单价") = Text2.Text
Adodc1.Recordset("数量") = Text3.Text
Adodc1.Recordset("单位") = Text4.Text
Adodc1.Recordset("总金额") = Text5.Text
Adodc1.Recordset("入库日期") = DTPicker1.Value
Adodc1.Recordset("经办人") = Text6.Text
Adodc1.Recordset.Update
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Combo1.Text = ""
End If
Else
MsgBox "数据不能为空,请输入数据!"
End If
End Sub
Private Sub Command4_Click()
If Len(Text1.Text) <> 0 And Len(Combo1.Text) <> 0 Then
aa = MsgBox("真的要删除该商品吗?", 1, "消息")
If aa = 1 Then
Adodc1.Recordset.Delete
Adodc1.Recordset.Update
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Combo1.Text = ""
End If
Else
MsgBox "数据不能为空,请选择商品!"
End If
End Sub
Private Sub Command5_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Combo1.Text = ""
If Command1.Caption = "保存" Then
Command1.Caption = "增加"
Command3.Enabled = True
End If
End Sub
Private Sub DataGrid1_Click()
If Command1.Caption = "保存" Then
Command1.Caption = "增加"
End If
If Adodc1.Recordset.EOF = False And Adodc1.Recordset.BOF = False Then
Combo1.Text = Adodc1.Recordset("商品名称")
Text1.Text = Adodc1.Recordset("型号")
Text2.Text = Adodc1.Recordset("单价")
Text3.Text = Adodc1.Recordset("数量")
Text4.Text = Adodc1.Recordset("单位")
Text5.Text = Adodc1.Recordset("总金额")
DTPicker1.Value = Adodc1.Recordset("入库日期")
Text6.Text = Adodc1.Recordset("经办人")
End If
End Sub
Private Sub Form_Load()
DTPicker1.Value = Date
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
KeyAscii = 0
SendKeys "{TAB}"
End If
End Sub
Private Sub Text2_Change()
If Text2.Text <> "" And Text3.Text <> "" Then
Text5.Text = Text2.Text * Text3.Text
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
KeyAscii = 0
SendKeys "{TAB}"
End If
End Sub
Private Sub Text3_Change()
If Text2.Text <> "" And Text3.Text <> "" Then
Text5.Text = Text2.Text * Text3.Text
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii < 48 Or KeyAscii > 57 Then
KeyAscii = 0
End If
If KeyAscii < 48 Or KeyAscii > 57 Then
KeyAscii = 0
End If
If KeyAscii = 13 Then
KeyAscii = 0
SendKeys "{TAB}"
End If
End Sub
Private Sub Text4_Change()
Combo1.BoundText = Text4.Text
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
KeyAscii = 0
SendKeys "{TAB}"
End If
End Sub
Private Sub Text5_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
KeyAscii = 0
SendKeys "{TAB}"
End If
End Sub
Private Sub Text6_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
KeyAscii = 0
SendKeys "{TAB}"
End If
End Sub
Private Sub Text7_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
KeyAscii = 0
SendKeys "{TAB}"
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -