📄 frmfanhuan.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmfanhuan
BorderStyle = 3 'Fixed Dialog
Caption = "返还数据"
ClientHeight = 3330
ClientLeft = 45
ClientTop = 330
ClientWidth = 6375
Icon = "frmfanhuan.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3330
ScaleWidth = 6375
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "退出"
Height = 435
Left = 3360
TabIndex = 3
Top = 2640
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 435
Left = 1800
TabIndex = 2
Top = 2640
Width = 1215
End
Begin VB.Frame Frame1
Caption = "指定返还区间"
Height = 2055
Left = 240
TabIndex = 0
Top = 240
Width = 5895
Begin VB.TextBox Text1
Enabled = 0 'False
Height = 270
Index = 1
Left = 3600
TabIndex = 11
Top = 1320
Width = 1335
End
Begin VB.TextBox Text1
Enabled = 0 'False
Height = 270
Index = 0
Left = 1920
TabIndex = 9
Top = 1320
Width = 1335
End
Begin VB.OptionButton Option1
Caption = "自动编号介于"
Height = 255
Index = 1
Left = 480
TabIndex = 8
Top = 1320
Width = 1575
End
Begin VB.OptionButton Option1
Caption = "出票日期介于"
Height = 255
Index = 0
Left = 480
TabIndex = 6
Top = 600
Value = -1 'True
Width = 1455
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 255
Left = 1920
TabIndex = 4
Top = 600
Width = 1335
_ExtentX = 2355
_ExtentY = 450
_Version = 393216
Format = 24444929
CurrentDate = 37331
End
Begin MSComCtl2.DTPicker DTPicker2
Height = 255
Left = 3600
TabIndex = 5
Top = 600
Width = 1335
_ExtentX = 2355
_ExtentY = 450
_Version = 393216
Format = 24444929
CurrentDate = 37331
End
Begin VB.Label Label2
Caption = "之间"
Height = 255
Index = 3
Left = 5040
TabIndex = 12
Top = 1360
Width = 495
End
Begin VB.Label Label2
Caption = "和"
Height = 255
Index = 2
Left = 3360
TabIndex = 10
Top = 1360
Width = 255
End
Begin VB.Label Label2
Caption = "之间"
Height = 255
Index = 1
Left = 5040
TabIndex = 7
Top = 640
Width = 495
End
Begin VB.Label Label2
Caption = "和"
Height = 255
Index = 0
Left = 3360
TabIndex = 1
Top = 640
Width = 255
End
End
End
Attribute VB_Name = "frmfanhuan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Screen.MousePointer = 11
Dim date1 As String
Dim date2 As String
date1 = Format(Me.DTPicker1.Value, "yyyy-m-d")
date2 = Format(Me.DTPicker2.Value, "yyyy-m-d")
With ycdck.Adodc1
.Recordset.Close
If Me.Option1(0).Value = True Then
.Recordset.Open "insert into 台帐录入 select * from 台帐数据 where 出票日期 between#" & date1 & "#and#" & date2 & "#"
.Refresh
.Recordset.Close
.Recordset.Open "delete * from 台帐数据 where 出票日期 between#" & date1 & "#and#" & date2 & "#"
.Refresh
End If
If Me.Option1(1).Value = True Then
.Recordset.Open "insert into 台帐录入 select * from 台帐数据 where 自动编号 >=" & Val(Text1(0).Text) & " and 自动编号<=" & Val(Text1(1).Text)
.Refresh
.Recordset.Close
.Recordset.Open "delete * from 台帐数据 where 自动编号 >=" & Val(Text1(0).Text) & " and 自动编号<=" & Val(Text1(1).Text)
.Refresh
End If
.Recordset.Close
End With
Unload Me
With frmDataEnv
.Adodc1.RecordSource = "select * from 台帐录入 order by 自动编号 asc"
.Adodc1.Refresh
Screen.MousePointer = 0
If .Adodc1.Recordset.RecordCount > 0 Then
.Adodc1.Recordset.MoveLast
End If
MsgBox "提领完成!", vbOKOnly Or vbInformation, "系统信息"
End With
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
With ycdck.Adodc1
.RecordSource = "select min(出票日期) as min出票日期,max(出票日期) as max出票日期 from 台帐数据"
.Refresh
Me.DTPicker1.Value = .Recordset.Fields(0)
Me.DTPicker2.Value = .Recordset.Fields(1)
End With
End Sub
Private Sub Option1_Click(Index As Integer)
Select Case Index
Case 0
For i = 0 To 1
Text1(i).Text = ""
Text1(i).Enabled = False
Next i
Me.DTPicker1.Enabled = True
Me.DTPicker2.Enabled = True
Case 1
Me.DTPicker1.Enabled = False
Me.DTPicker2.Enabled = False
For i = 0 To 1
Text1(i).Enabled = True
Next i
Text1(0).SetFocus
End Select
End Sub
'请首先进行有关设置
Private Sub Text1_Change(Index As Integer)
End Sub
Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
If KeyAscii = 46 Then
Exit Sub
End If
If KeyAscii = 8 Then
Exit Sub
ElseIf KeyAscii < 48 Or KeyAscii > 57 Then
Beep
KeyAscii = 0
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -