📄 frmzxh.frm
字号:
VERSION 5.00
Begin VB.Form frmzxh
BorderStyle = 1 'Fixed Single
Caption = "注销户口"
ClientHeight = 3720
ClientLeft = 45
ClientTop = 330
ClientWidth = 4665
ControlBox = 0 'False
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 3720
ScaleWidth = 4665
Begin VB.CommandButton Command2
Caption = "进入"
Height = 375
Left = 2640
TabIndex = 5
Top = 3000
Width = 855
End
Begin VB.CommandButton Command1
Caption = "取消"
Height = 375
Left = 1080
TabIndex = 4
Top = 3000
Width = 855
End
Begin VB.TextBox Text2
Height = 270
Left = 2880
MaxLength = 10
TabIndex = 3
Top = 1800
Width = 1335
End
Begin VB.TextBox Text1
Height = 270
Left = 1920
MaxLength = 3
TabIndex = 1
Top = 1800
Width = 615
End
Begin VB.Label Label3
Caption = "注销户口验证"
BeginProperty Font
Name = "隶书"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 480
TabIndex = 7
Top = 360
Width = 2295
End
Begin VB.Shape Shape1
Height = 615
Left = 240
Top = 240
Width = 2775
End
Begin VB.Label Label4
Caption = "·输入正确户号才能进入注销户口页面"
ForeColor = &H00000080&
Height = 255
Left = 360
TabIndex = 6
Top = 1200
Width = 3375
End
Begin VB.Image Image1
Height = 495
Left = 3360
Picture = "frmzxh.frx":0000
Top = 240
Width = 510
End
Begin VB.Line Line1
X1 = 0
X2 = 4680
Y1 = 2640
Y2 = 2640
End
Begin VB.Label Label2
Caption = "-"
Height = 255
Left = 2640
TabIndex = 2
Top = 1800
Width = 135
End
Begin VB.Label Label1
Caption = "请输入户号:"
Height = 375
Left = 360
TabIndex = 0
Top = 1800
Width = 1335
End
End
Attribute VB_Name = "frmzxh"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
Unload frmzxh
'初始化主窗口
mainfrm.guanli.Enabled = True
mainfrm.chaxun.Enabled = True
mainfrm.tongji.Enabled = True
If userid = "admin" Then
mainfrm.xitong.Enabled = True
mainfrm.bdb.Enabled = True
Else
mainfrm.xitong.Enabled = False
mainfrm.bdb.Enabled = False
End If
mainfrm.Command1.Enabled = True
mainfrm.Command2.Enabled = True
mainfrm.Command3.Enabled = True
If userid = "admin" Then
mainfrm.Command4.Enabled = True
Else
mainfrm.Command4.Enabled = False
End If
GetStatus "<就绪>"
End Sub
Private Sub Command2_Click()
Dim thuhao As String
Dim cnn As New ADODB.Connection
Dim ret As New ADODB.Recordset
Dim local_db As String
thuhao = Trim(Text1.Text) & Label2.Caption & Trim(Text2.Text)
If Text1.Text = "" Or Text2.Text = "" Then
MsgBox "户号未输入或格式不正确", , "警告"
Text1.SetFocus
Text1.Text = ""
Text2.Text = ""
Else
Set cnn = New ADODB.Connection
Set ret = New ADODB.Recordset
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path & "\data\db.mdb" + ";Persist Security Info=False;"
local_db = "select * from 户口表" + _
" where 户口表.户号=" + "'" + thuhao + "'"
ret.Open local_db, cnn
If ret.BOF And ret.EOF Then
MsgBox "无此户号,请重新输入"
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
Else
Dim d1 As String
frmqchu.Command2.Visible = True
frmqchu.Command2.Enabled = True
frmqchu.Command3.Visible = True
frmqchu.Command3.Enabled = True
frmqchu.Label19.Visible = True
frmqchu.Label19.Enabled = True
frmqchu.Text4.Enabled = False
frmqchu.Text4.Visible = False
frmqchu.Label20.Visible = False
frmqchu.Command4.Visible = False
frmqchu.Command4.Enabled = False
frmqchu.Command1.Visible = False
frmqchu.Command1.Enabled = False
frmqchu.Frame4.Enabled = True
frmqchu.Frame4.Visible = True
frmqchu.Caption = "注销户口"
frmqchu.Label13.Caption = ""
frmqchu.Label3.Caption = ret("户号")
frmqchu.Label7.Caption = ret("登记日期")
frmqchu.Label11.Caption = ret("户别")
frmqchu.Label16.Caption = ret("户主姓名")
frmqchu.Label17.Caption = ret("住址")
frmqchu.Label9.Caption = ret("迁入日期")
frmqchu.Label18.Caption = ret("何地迁入")
If frmqchu.Label9.Caption <> "" And frmqchu.Label18.Caption <> "" Then
frmqchu.Option4.Enabled = False
frmqchu.Option4.Value = False
frmqchu.Option3.Enabled = True
frmqchu.Option3.Value = True
End If
ret.Close
Set ret = New ADODB.Recordset
local_db = "select * from 户迁出表" + _
" where 户迁出表.户号=" + "'" + thuhao + "'"
ret.Open local_db, cnn
If Not (ret.BOF And ret.EOF) Then
frmqchu.Option1.Enabled = False
frmqchu.Option1.Value = False
frmqchu.Option2.Enabled = True
frmqchu.Option2.Value = True
frmqchu.Label13.Caption = ret("迁出日期")
frmqchu.Label19.Caption = ret("迁往何地")
End If
Unload frmzxh
frmqchu.Show
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -