📄 menuask.frm
字号:
VERSION 5.00
Begin VB.Form menuask
BorderStyle = 1 'Fixed Single
Caption = "售房管理 增加楼栋数"
ClientHeight = 2145
ClientLeft = 45
ClientTop = 330
ClientWidth = 3765
LinkTopic = "Form2"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 2145
ScaleWidth = 3765
Visible = 0 'False
Begin VB.TextBox Text1
Height = 375
Left = 0
MaxLength = 1
TabIndex = 0
Top = 600
Width = 3735
End
Begin VB.TextBox Text5
Height = 375
Left = 2880
MaxLength = 2
TabIndex = 12
Top = 1080
Width = 495
End
Begin VB.TextBox Text4
Height = 375
Left = 1920
MaxLength = 2
TabIndex = 10
Top = 1080
Width = 495
End
Begin VB.TextBox Text3
Height = 375
Left = 960
MaxLength = 2
TabIndex = 8
Top = 1080
Width = 495
End
Begin VB.TextBox Text2
Height = 375
Left = 0
MaxLength = 2
TabIndex = 6
Top = 1080
Width = 495
End
Begin VB.PictureBox Picture1
Height = 1095
Left = 0
Picture = "menuask.frx":0000
ScaleHeight = 1035
ScaleWidth = 3675
TabIndex = 1
Top = 0
Width = 3735
Begin VB.Label Label1
BackStyle = 0 'Transparent
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 855
Left = 240
TabIndex = 2
Top = 120
Width = 3255
End
End
Begin VB.Frame Frame1
Height = 615
Left = 240
TabIndex = 3
Top = 1440
Width = 3255
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 240
TabIndex = 5
Top = 160
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 375
Left = 1800
TabIndex = 4
Top = 160
Width = 1215
End
End
Begin VB.Label Label5
Caption = "户"
Height = 255
Left = 3480
TabIndex = 13
Top = 1200
Width = 255
End
Begin VB.Label Label4
Caption = "层"
Height = 255
Left = 2580
TabIndex = 11
Top = 1200
Width = 495
End
Begin VB.Label Label3
Caption = "单元"
Height = 255
Left = 1500
TabIndex = 9
Top = 1200
Width = 495
End
Begin VB.Label Label2
Caption = "栋"
Height = 255
Left = 650
TabIndex = 7
Top = 1200
Width = 255
End
End
Attribute VB_Name = "menuask"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If frmzhda.cxkey = 1 Then
condition = " "
s1 = LTrim(Str$(Val(Text2.Text)))
s2 = LTrim(Str$(Val(Text3.Text)))
s3 = LTrim(Str$(Val(Text4.Text)))
s4 = LTrim(Str$(Val(Text5.Text)))
If Len(s1) < 2 Then s1 = "0" + s1
If Len(s2) < 2 Then s2 = "0" + s2
If Len(s3) < 2 Then s3 = "0" + s3
If Len(s4) < 2 Then s4 = "0" + s4
If s1 <> "00" Then condition = " kloud='" + s1 + "' and"
If s2 <> "00" Then condition = condition + " kloudy='" + s2 + "' and"
If s3 <> "00" Then condition = condition + " klouc='" + s3 + "' and"
If s4 <> "00" Then condition = condition + " klouhu='" + s4 + "' and"
If Len(condition) > 3 Then
condition = Left(condition, Len(condition) - 3)
condition = "select * from xxb where" + condition
End If
If LTrim(condition) = "" Then condition = "xxb"
Dim xq As Database
Dim xqtab As Recordset
Set xq = OpenDatabase(App.Path + "\sfgl.mdb")
Set xqtab = xq.OpenRecordset("cdcx")
xqtab.Edit
xqtab("tj") = condition
xqtab.Update
frmzhda.Enabled = True
frmzhda.changebj = 0
frmzhda.cxkey = 0
Unload Me
End If
Select Case winmenu0.nowkey
Case 2, 3, 6
If Val(Text1.Text) > 0 And Val(Text1.Text) <= 10 - winmenu0.nownum Then
winmenu0.Enabled = True
winmenu0.nowretu = Val(Text1.Text)
Else
MsgBox "超出允许范围,请重新输入!", vbOKOnly + vbExclamation, "金风售房管理系统"
Text1.SetFocus
Exit Sub
End If
winmenu0.nowretuyn = winmenu0.nowkey
Case 9
If Val(Text1.Text) > 0 And Val(Text1.Text) <= 3 - winmenu0.nownum Then
winmenu0.Enabled = True
winmenu0.nowretu = Val(Text1.Text)
Else
MsgBox "超出允许范围,请重新输入!", vbOKOnly + vbExclamation, "金风售房管理系统"
Text1.SetFocus
Exit Sub
End If
winmenu0.nowretuyn = 4
Case 22, 23, 26, 29
If Val(Text1.Text) > 0 And Val(Text1.Text) <= winmenu0.nownum - 1 Then
winmenu0.nowretu = Val(Text1.Text)
Else
MsgBox "超出允许范围,请重新输入!", vbOKOnly + vbExclamation, "金风售房管理系统"
Text1.SetFocus
Exit Sub
End If
delyn = MsgBox("一旦删除本项目,则其下所含的所有信息都将丢失,且无法恢复。请确认本项目已无用,并于删除前作数据备份。" + Chr(13) + "确认删除吗(Y/N)?", vbYesNo + vbQuestion, "金风售房管理系统")
If delyn = vbYes Then
winmenu0.nowretuyn = winmenu0.nowkey
Else
winmenu0.nowretuyn = 0
End If
End Select
Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
'MsgBox frmzhda.cxkey
'MsgBox winmenu0.nowkey
Text1.Top = 1080
Text1.Left = 0
Me.Left = 2500
Me.Top = 1300
Me.Height = 2520
Me.Width = 3885
mess = "注:删除项目时,由后向前删除"
Select Case frmzhda.cxkey
Case 1
Label1.Caption = "直接查询用于查询满足条件的所有住户,输入空代表全部"
Text1.Visible = False
End Select
Select Case winmenu0.nowkey
Case 2
Label1.Caption = " 每个小区内最多允许有十栋楼,您目前已有:" + LTrim(Str$(winmenu0.nownum)) + "栋楼,最多还可增加" + LTrim(Str$(10 - winmenu0.nownum)) + "栋 请问您要增加几栋楼?"
Case 3
Label1.Caption = " 每栋楼最多允许有十个单元,您目前已有:" + LTrim(Str$(winmenu0.nownum)) + "个单元,最多还可增加" + LTrim(Str$(10 - winmenu0.nownum)) + "个单元 请问您要增加几个单元?"
Case 6
Label1.Caption = " 每个单元最多允许有十个楼层,您目前已有:" + LTrim(Str$(winmenu0.nownum)) + "个楼层,最多还可增加" + LTrim(Str$(10 - winmenu0.nownum)) + "个楼层 请问您要增加几个楼层?"
Case 9
Label1.Caption = " 每个楼层最多允许有三个户位,您目前已有:" + LTrim(Str$(winmenu0.nownum)) + "个户位,最多还可增加" + LTrim(Str$(3 - winmenu0.nownum)) + "个户位 请问您要增加几个户位?"
Case 22
Label1.Caption = " 这个小区内目前有:" + LTrim(Str$(winmenu0.nownum)) + "栋楼,最多可删除" + LTrim(Str$(winmenu0.nownum - 1)) + "栋 请问您要删除几栋楼?" + Chr(13) + mess
Case 23
Label1.Caption = " 这栋楼内目前有:" + LTrim(Str$(winmenu0.nownum)) + "个单元,最多可删除" + LTrim(Str$(winmenu0.nownum - 1)) + "个单元 请问您要删除几个单元?" + Chr(13) + mess
Case 26
Label1.Caption = " 这个单元内目前有:" + LTrim(Str$(winmenu0.nownum)) + "层楼,最多可删除" + LTrim(Str$(winmenu0.nownum - 1)) + "层 请问您要删除几层楼?" + Chr(13) + mess
Case 29
Label1.Caption = " 这个楼层内目前有:" + LTrim(Str$(winmenu0.nownum)) + "户,最多可删除" + LTrim(Str$(winmenu0.nownum - 1)) + "户 请问您要删除几户?" + Chr(13) + mess
End Select
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
'If winmenu0.nowkey = 0 Or winmenu0.nowkey = Null Or winmenu0.nowkey = Empty Then Else winmenu0.Enabled = True
'If frmzhda.cxkey = 0 Or frmzhda.cxkey = Null Or frmzhda.cxkey = Empty Then Else frmzhda.Enabled = True
If Text1.Visible = False Then
frmzhda.Enabled = True
Else
winmenu0.Enabled = True
End If
Text1.Visible = True
End Sub
Private Sub text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then Command1.SetFocus
If KeyAscii < 48 Or KeyAscii > 57 Then If KeyAscii <> 8 Then KeyAscii = 0
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then Text3.SetFocus
If KeyAscii < 48 Or KeyAscii > 57 Then If KeyAscii <> 8 Then KeyAscii = 0
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then Text4.SetFocus
If KeyAscii < 48 Or KeyAscii > 57 Then If KeyAscii <> 8 Then KeyAscii = 0
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then Text5.SetFocus
If KeyAscii < 48 Or KeyAscii > 57 Then If KeyAscii <> 8 Then KeyAscii = 0
End Sub
Private Sub Text5_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then Command1.SetFocus
If KeyAscii < 48 Or KeyAscii > 57 Then If KeyAscii <> 8 Then KeyAscii = 0
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -