?? form27.frm
字號:
VERSION 5.00
Begin VB.Form Form27
BorderStyle = 3 'Fixed Dialog
Caption = "Form27"
ClientHeight = 5670
ClientLeft = 45
ClientTop = 330
ClientWidth = 6165
LinkTopic = "Form27"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5670
ScaleWidth = 6165
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command3
Caption = "按月份查"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 4080
TabIndex = 10
Top = 3960
Width = 1575
End
Begin VB.CommandButton Command2
Caption = "按單據號查"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2520
TabIndex = 9
Top = 3960
Width = 1575
End
Begin VB.ComboBox Combo1
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 2640
TabIndex = 8
Top = 2520
Width = 1775
End
Begin VB.CommandButton Command1
Caption = "按帳本號查"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 960
TabIndex = 7
Top = 3960
Width = 1575
End
Begin VB.TextBox Text4
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 440
Left = 2640
TabIndex = 6
Top = 3000
Width = 1775
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 440
Left = 2640
TabIndex = 5
Top = 1920
Width = 1775
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 440
Left = 2640
TabIndex = 4
Top = 1320
Width = 1775
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "帳單核對畫面"
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 2280
TabIndex = 11
Top = 600
Width = 1890
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "帳單號:"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 1800
TabIndex = 3
Top = 3120
Width = 960
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "帳本號:"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 1800
TabIndex = 2
Top = 2520
Width = 960
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "月 份:"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 1800
TabIndex = 1
Top = 2040
Width = 960
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "年 份:"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 1800
TabIndex = 0
Top = 1440
Width = 960
End
End
Attribute VB_Name = "Form27"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Combo1.Text = "" Then
MsgBox ("帳本號不能為空!")
Combo1.SetFocus
GoSub exit_Command1_Click
End If
g_year = Text1.Text
g_month = Text2.Text
g_book = Combo1.Text
g_query_method = 1
g_form = "form27"
Form27.Hide
Form28.Show
exit_Command1_Click:
End Sub
Private Sub Command2_Click()
If Text4.Text = "" Then
MsgBox ("帳單號不能為空!")
Text4.SetFocus
GoSub exit_command2_click
End If
g_year = Text1.Text
g_month = Text2.Text
g_reckoning = Text4.Text
g_query_method = 2
g_form = "form27"
Form27.Hide
Form28.Show
exit_command2_click:
End Sub
Private Sub Command3_Click()
g_year = Text1.Text
g_month = Text2.Text
g_query_method = 3
g_form = "form27"
Form27.Hide
Form28.Show
End Sub
Private Sub Form_Load()
Dim cnn1 As ADODB.Connection
Dim cmd1 As ADODB.Command
Dim rs As ADODB.Recordset
Set cnn1 = New ADODB.Connection
Set rs1 = New ADODB.Recordset
cnn1.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\jujumao\My Documents\粵豐飼料\粵豐飼料經營情況.mdb;Persist Security Info=False"
Set cmd1 = New ADODB.Command
SQL = "select 帳本號 from 帳本表 where 使用年份= " & g_year
With cmd1
.ActiveConnection = cnn1
.CommandText = SQL
.CommandType = adCmdText
End With
Set rs1 = cmd1.Execute
rs1.MoveFirst
i = 0
While Not rs1.EOF
Combo1.AddItem rs1.Fields(0), i
rs1.MoveNext
i = i + 1
Wend
cnn1.Close
Set cnn1 = Nothing
Text1.Text = g_year
Text2.Text = g_month
End Sub
Private Sub Form_Unload(Cancel As Integer)
Form5.Show
End Sub
Private Sub Text1_GotFocus()
Combo1.SetFocus
End Sub
Private Sub Text2_GotFocus()
Combo1.SetFocus
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -