📄 chose_project.frm
字号:
VERSION 5.00
Begin VB.Form Chose_Project
Appearance = 0 'Flat
BackColor = &H80000005&
BorderStyle = 1 'Fixed Single
Caption = "方案选择"
ClientHeight = 2910
ClientLeft = 45
ClientTop = 435
ClientWidth = 4800
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 2910
ScaleWidth = 4800
Begin VB.CommandButton tc
Caption = "退出"
Height = 375
Left = 3360
TabIndex = 5
Top = 2040
Width = 1095
End
Begin VB.ComboBox FangShi
Height = 300
ItemData = "Chose_Project.frx":0000
Left = 2880
List = "Chose_Project.frx":000A
Style = 2 'Dropdown List
TabIndex = 3
Top = 1480
Width = 1575
End
Begin VB.ComboBox Fang_An
Height = 300
Left = 2880
TabIndex = 1
Top = 1005
Width = 1575
End
Begin VB.CommandButton Fa
Caption = "确定"
Height = 375
Left = 1920
TabIndex = 0
Top = 2040
Width = 1095
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "用户抄表方案选择"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000018&
Height = 255
Left = 360
TabIndex = 6
Top = 120
Width = 3015
End
Begin VB.Image Image2
Appearance = 0 'Flat
Height = 555
Left = 0
Picture = "Chose_Project.frx":0022
Stretch = -1 'True
Top = 0
Width = 4935
End
Begin VB.Image Image1
Height = 2220
Left = 240
Picture = "Chose_Project.frx":23A6
Stretch = -1 'True
Top = 360
Width = 1605
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "抄表方式:"
Height = 255
Left = 1920
TabIndex = 4
Top = 1560
Width = 975
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "用户方案:"
Height = 255
Left = 1920
TabIndex = 2
Top = 1080
Width = 975
End
End
Attribute VB_Name = "Chose_Project"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Download by http://www.codefans.net
Const RGN_OR = 2
Dim Rs As ADODB.Recordset
Private Sub Fa_Click()
If Fang_An.Text <> "" Then
Fa_Name = Trim(Fang_An.Text)
Fang_Shi = Trim(FangShi.Text)
ChaoBiao.Caption = Fa_Name
ChaoBiao.Label1 = "抄表方案: " & Fa_Name
App_Main.StatusBar1.Panels.Item(2).Text = "抄表方案:" & Fa_Name
Load_FangAn
ChaoBiao.Show
Unload Me
Else
MsgBox "【提示信息:】" & vbCrLf & "请选择用户抄表方案!", vbInformation, "信息"
End If
End Sub
Private Sub Form_Load()
Me.Left = (App_Main.Width) / 2 - (Me.Width) / 2
Me.Top = (App_Main.Height) / 2 - (Me.Height)
FangShi.ListIndex = 1
Load_FangAn
End Sub
Private Sub tc_Click()
Unload Me
End Sub
Public Sub Load_FangAn()
Fang_An.Clear
Dim i As Variant
Dim SQL As String
Connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\fa.mdb;Persist Security Info=True"
SQL = " Select 方案名称 From 方案 Group by 方案名称"
Set Rs = New ADODB.Recordset
Rs.CursorType = adOpenKeyset
Rs.LockType = adLockOptimistic
Rs.Open SQL, Connstr, , , adCmdText
If Not Rs.EOF Then
Rs.MoveFirst
For i = 0 To Rs.RecordCount - 1
Fang_An.AddItem Rs.Fields("方案名称").Value, i
Rs.MoveNext
Next i
End If
Set Rs = Nothing
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -