📄 bg_jck_zxd.frm
字号:
End
Begin VB.ComboBox Combo3
Height = 300
Left = 945
TabIndex = 15
Top = 900
Width = 1695
End
Begin VB.ComboBox Combo2
Height = 300
Left = 945
TabIndex = 14
Top = 585
Width = 1695
End
Begin MSComCtl2.DTPicker DTPicker2
Height = 285
Left = 2700
TabIndex = 20
Top = 255
Width = 1320
_ExtentX = 2328
_ExtentY = 503
_Version = 393216
Format = 178257921
CurrentDate = 37827
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 285
Left = 1170
TabIndex = 19
Top = 255
Width = 1275
_ExtentX = 2249
_ExtentY = 503
_Version = 393216
Format = 178257921
CurrentDate = 37827
End
Begin VB.Label Label4
Caption = "客户编号:"
Height = 225
Index = 1
Left = 45
TabIndex = 41
Top = 945
Width = 945
End
Begin VB.Label Label5
Caption = "公司编号:"
Height = 225
Left = 45
TabIndex = 40
Top = 630
Width = 945
End
Begin VB.Label Label2
Caption = "发票日期:自"
Height = 225
Left = 45
TabIndex = 17
Top = 315
Width = 1695
End
Begin VB.Label Label3
Caption = "至"
Height = 195
Left = 2475
TabIndex = 16
Top = 300
Width = 315
End
End
Begin MSAdodcLib.Adodc Adoprimaryrs
Height = 330
Left = 4365
Top = 3735
Width = 3495
_ExtentX = 6165
_ExtentY = 582
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 = "adoprimaryrs"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "PMingLiU"
Size = 9
Charset = 136
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSAdodcLib.Adodc Adodc_body_general
Height = 375
Left = 4140
Top = 3870
Visible = 0 'False
Width = 3855
_ExtentX = 6800
_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 = "Adodc_body_general"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "PMingLiU"
Size = 9
Charset = 136
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSAdodcLib.Adodc ado_YL_Cx
Height = 615
Left = 4410
Top = 675
Width = 3015
_ExtentX = 5318
_ExtentY = 1085
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 = "ado_YL_Cx"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "PMingLiU"
Size = 9
Charset = 136
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin TrueOleDBGrid60.TDBGrid TDBGrid3
Bindings = "bg_jck_zxd.frx":CB9D
Height = 6675
Left = 0
OleObjectBlob = "bg_jck_zxd.frx":CBB8
TabIndex = 18
Top = 0
Width = 2385
End
End
Attribute VB_Name = "bg_jck_zxd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Sumsl As Recordset
Dim mvBookMark As Variant
Dim khdk As Adodb.Recordset
Dim ddxg_RPT As Adodb.Recordset
Dim zztz_rpt As Adodb.Recordset
Dim LcYY As String
Dim Bmky As String
Dim Bmkt As String
Dim HXkt As String
Dim Eky As String
Dim Ekt As String
Dim Combo5_Data As Recordset
Dim Combo6_Data As Recordset
Dim Tjbz As Boolean
Dim Fph_T As String
Dim Fph_CX As Recordset
Dim xsFph_ado As Recordset
Dim Xsfp_Str As String
Dim Khbh_str As String
Dim GSBH_Str As String
Private Sub CmdFIND_Click() '查询
If DTPicker1.Value <= DTPicker2.Value Then
If Trim(Combo2.Text) = "" Then
GSBH_Str = ""
Else
GSBH_Str = "AND gsbh='" & Trim(Combo2.Text) & "'"
End If
If Trim(Combo3.Text) = "" Then
Khbh_str = ""
Else
Khbh_str = "AND khbh='" & Trim(Combo3.Text) & "'"
End If
AdoprimaryRs.ConnectionString = Conn_Str
AdoprimaryRs.RecordSource = "select * from yy_cpxsdt where djrq>='" & CVDate(DTPicker1.Value) & "' and djrq<='" & CVDate(DTPicker2.Value) & "'" & GSBH_Str & Khbh_str
AdoprimaryRs.Refresh
Else
MsgBox "起始时间不能晚于截止时间,请重新设置。", vbOKOnly + 16, "系统提示"
Exit Sub
End If
End Sub
Private Sub CmdPrint_Click()
bg_xsfp_rpt.DataControl1.ConnectionString = Conn_Str
bg_xsfp_rpt.DataControl1.Source = "select YY_CPXSDT.*,YY_CPXSD.XH,YY_CPXSD.GOODS,YY_CPXSD.GOODS,YY_CPXSD.MARK,YY_CPXSD.UNITPRICE,YY_CPXSD.UNIT,YY_CPXSD.QUANTITY,YY_CPXSD.AMOUNT from YY_CPXSDT INNER JOIN YY_CPXSD ON YY_CPXSDT.XSFPH=YY_CPXSD.XSFPH where yy_cpxsdt.xsfph='" & Trim(Text1(2).Text) & "'"
bg_xsfp_rpt.Show VBRUN.FormShowConstants.vbModal
End Sub
Private Sub Cmdreturn_Click()
Unload Me
End Sub
Private Sub combo_KeyPress(Index As Integer, KeyAscii As Integer)
If KeyAscii = 13 Then '回车
KeyAscii = 0
SendKeys "{TAB}"
End If
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) '非法退出
If CmdOK.Enabled = True Then
If UnloadMode <> VBRUN.QueryUnloadConstants.vbFormCode Then
Cancel = 1
Exit Sub
End If
End If
End Sub
Private Sub Form_Load() '装载窗体
Me.Width = main_FRM.Picture1.Width - 30
Me.Top = main_FRM.ActiveBar21.Bands("Band7").Height * 2.5 - 65
Me.Height = main_FRM.Picture1.Height - 300
Me.Left = main_FRM.Picture1.Left + 15
Call combo_load
DTPicker1.Value = VBA.Date - 3
DTPicker2.Value = VBA.Date
CmdOK.Enabled = False
For i = 0 To Text1.Count - 1
Text1(i).Locked = True
Next i
For i = 0 To Combo.Count - 1
Combo(i).Locked = True
Next i
End Sub
Private Sub Text1_Change(Index As Integer)
If Index = 2 Then
Adodc_body_general.ConnectionString = Conn_Str
Adodc_body_general.CommandType = adCmdUnknown
Adodc_body_general.RecordSource = "select * from yy_cpxsd where xsfph='" & Trim(Text1(2).Text) & "'"
Adodc_body_general.Refresh
If Not IsNull(AdoprimaryRs.Recordset!ZJJE) And AdoprimaryRs.Recordset.BOF = False And AdoprimaryRs.Recordset.EOF = False Then
TDBGrid1.Columns(6).FooterText = AdoprimaryRs.Recordset.Fields("zjje").Value
TDBGrid1.Columns(4).FooterText = AdoprimaryRs.Recordset.Fields("zjsl").Value
Else
TDBGrid1.Columns(6).FooterText = ""
TDBGrid1.Columns(4).FooterText = ""
End If
End If
End Sub
Private Sub text1_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
If KeyCode = 40 Then '
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -