📄 main_rcyw_xsth.frm
字号:
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column11
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 Column12
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
MarqueeStyle = 4
BeginProperty Column00
ColumnWidth = 915.024
EndProperty
BeginProperty Column01
ColumnWidth = 2085.166
EndProperty
BeginProperty Column02
ColumnWidth = 2085.166
EndProperty
BeginProperty Column03
ColumnWidth = 2085.166
EndProperty
BeginProperty Column04
ColumnWidth = 1365.165
EndProperty
BeginProperty Column05
ColumnWidth = 2085.166
EndProperty
BeginProperty Column06
ColumnWidth = 2085.166
EndProperty
BeginProperty Column07
ColumnWidth = 2085.166
EndProperty
BeginProperty Column08
ColumnWidth = 2085.166
EndProperty
BeginProperty Column09
ColumnWidth = 1365.165
EndProperty
BeginProperty Column10
ColumnWidth = 1365.165
EndProperty
BeginProperty Column11
ColumnWidth = 2085.166
EndProperty
BeginProperty Column12
ColumnWidth = 2085.166
EndProperty
EndProperty
End
Begin MSAdodcLib.Adodc Adodc1
Height = 345
Left = -810
Top = 75
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 609
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=XSGL"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=XSGL"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from 销售信息表"
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
Begin MSAdodcLib.Adodc Adodc2
Height = 345
Left = -540
Top = 150
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 609
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=XSGL"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=XSGL"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from 销售信息表"
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
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "退货信息表"
Height = 255
Left = 90
TabIndex = 5
Top = 2070
Width = 3405
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "请选择票号:"
Height = 345
Left = 90
TabIndex = 2
Top = 165
Width = 5520
End
End
Attribute VB_Name = "main_rcyw_xsth"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim i, s, Y
Dim rs1 As New ADODB.Recordset
Private Sub Command1_Click()
Dim r As Integer
For i = 0 To 12
DataGrid1.Col = i
MS1.TextMatrix(MS1.Rows - 1, i) = DataGrid1.Text
Next i
MS1.AddItem (1)
End Sub
Private Sub Command2_Click()
Dim r, c As Integer
rs1.Open "select * from 销售退货信息表", Cnn, adOpenKeyset, adLockOptimistic '打开数据库
For r = 1 To MS1.Rows - 2
'添加新记录到"销售信息表"表中
rs1.AddNew
For c = 0 To 12
rs1.Fields(c) = Trim(MS1.TextMatrix(r, c))
Next c
rs1.Fields("退货日期") = Date
Next r
rs1.Update
rs1.Close
MsgBox "退货成功!", , "明日软件"
End Sub
Private Sub Command3_Click()
Call CmdEnd(Me)
End Sub
Private Sub DataCombo1_Click(Area As Integer)
Adodc1.RecordSource = "select * from 销售信息表 where 票号='" + Trim(DataCombo1.Text) + "'"
Adodc1.Refresh
End Sub
Private Sub Form_Load()
MS1.Cols = 13 '定义MS1表的总行数、总列数
'定义MS1表格的列宽及表头
s = Array("1200", "2100", "1800", "1500", "765", "1200", "1200", "1200", "2000", "1200", "1200", "1600", "2400")
Y = Array("商品编号", "商品名称", "规格", "产地", "单位", "单价", "数量", "金额", "客户全称", "操作员", "销售员", "日期", "票号")
For i = 0 To 12
MS1.ColWidth(i) = s(i)
MS1.TextMatrix(0, i) = Y(i)
Next i
End Sub
Private Sub Form_Unload(Cancel As Integer)
frm_main.Enabled = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -