?? form2.frm
字號:
VERSION 5.00
Begin VB.Form Form2
BorderStyle = 1 'Fixed Single
Caption = "Form2"
ClientHeight = 5100
ClientLeft = 45
ClientTop = 435
ClientWidth = 6450
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5100
ScaleWidth = 6450
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "確認"
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 450
Left = 2160
TabIndex = 8
Top = 3960
Width = 1935
End
Begin VB.ComboBox Combo2
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
ItemData = "Form2.frx":0000
Left = 2880
List = "Form2.frx":002B
TabIndex = 7
Text = "購入明細"
Top = 3240
Width = 2220
End
Begin VB.ComboBox Combo1
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
ItemData = "Form2.frx":00BD
Left = 2880
List = "Form2.frx":00BF
TabIndex = 6
Text = "玉米"
Top = 2520
Width = 2220
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 450
Left = 2880
TabIndex = 5
Text = "Text2"
Top = 1800
Width = 2220
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 450
Left = 2880
TabIndex = 4
Text = "text1"
Top = 1080
Width = 2220
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 = 2040
TabIndex = 9
Top = 360
Width = 2205
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "輸入類型:"
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 1440
TabIndex = 3
Top = 3240
Width = 1425
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "品 種:"
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 1440
TabIndex = 2
Top = 2520
Width = 1455
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "月 份:"
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 1440
TabIndex = 1
Top = 1680
Width = 1455
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "年 份:"
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 1440
TabIndex = 0
Top = 1080
Width = 1455
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
g_year = Text1.Text
g_month = Text2.Text
g_breed = Combo1.Text
Form2.Hide
Select Case Combo2.Text
Case "購入明細"
g_form = "form2"
g_reckoning = ""
Form3.Show
Case "售出明細"
g_form = "form2"
g_reckoning = ""
Form4.Show
Case "費用明細"
Form8.Show
Case "還款情況"
Form7.Show
Case "費用項目"
Form16.Show
Case "品種類型"
Form17.Show
Case "寄售明細"
Form19.Show
Case "售出帳單輸入"
Form26.Show
Case "帳本輸入"
Form29.Show
Case "資產輸入"
Form35.Show
Case "購入帳單輸入"
Form37.Show
Case "跟單費用項目"
Form41.Show
Case "短語輸入"
Form48.Show
End Select
End Sub
Private Sub Form_Load()
Text1.Text = Year(Date)
Text2.Text = Month(Date)
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Set conn = New ADODB.Connection
Set rs = New ADODB.Recordset
connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\jujumao\My Documents\粵豐飼料\粵豐飼料經營情況.mdb;Persist Security Info=False"
conn.Open connstr
rs.Open "品種類型表", conn, adOpenKeyset, adLockPessimistic
rs.MoveFirst
i = 0
While Not rs.EOF
Combo1.AddItem rs.Fields(0), i
rs.MoveNext
i = i + 1
Wend
conn.Close
Set conn = Nothing
End Sub
Private Sub Form_Unload(Cancel As Integer)
Form1.Show
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -