⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form17.frm

📁 办公自动化 vb+server2
💻 FRM
📖 第 1 页 / 共 5 页
字号:
      Left            =   4680
      TabIndex        =   116
      Top             =   4245
      Width           =   825
   End
   Begin VB.Line Line1 
      Index           =   17
      X1              =   2640
      X2              =   10200
      Y1              =   8380
      Y2              =   8380
   End
   Begin VB.Label Label18 
      BackStyle       =   0  'Transparent
      Caption         =   "备   注"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   3240
      TabIndex        =   115
      Top             =   7800
      Width           =   735
   End
   Begin VB.Line Line2 
      Index           =   13
      X1              =   4440
      X2              =   4440
      Y1              =   7629.552
      Y2              =   4377.612
   End
   Begin VB.Line Line1 
      Index           =   16
      X1              =   2640
      X2              =   10200
      Y1              =   3251.94
      Y2              =   3251.94
   End
   Begin VB.Line Line1 
      Index           =   18
      X1              =   2640
      X2              =   10200
      Y1              =   3627.164
      Y2              =   3627.164
   End
   Begin VB.Line Line1 
      Index           =   19
      X1              =   2640
      X2              =   10200
      Y1              =   5753.433
      Y2              =   5753.433
   End
   Begin VB.Line Line1 
      Index           =   20
      X1              =   2640
      X2              =   10200
      Y1              =   6128.657
      Y2              =   6128.657
   End
   Begin VB.Line Line1 
      Index           =   21
      X1              =   2640
      X2              =   10200
      Y1              =   6503.881
      Y2              =   6503.881
   End
   Begin VB.Line Line1 
      Index           =   22
      X1              =   2640
      X2              =   10200
      Y1              =   6879.104
      Y2              =   6879.104
   End
   Begin VB.Line Line1 
      Index           =   23
      X1              =   2640
      X2              =   10200
      Y1              =   7254.329
      Y2              =   7254.329
   End
   Begin VB.Line Line1 
      Index           =   24
      X1              =   2640
      X2              =   10200
      Y1              =   7629.552
      Y2              =   7629.552
   End
End
Attribute VB_Name = "Form17"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Command1_Click()
Dim a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32, a33, a34, a35, a36, a40, a41, a42, a43, a44, a45, a46, a47, a48, a49, a50
Dim b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33, b34, b35, b36, b37, b38, b39, b40
Dim c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19 As String
Dim d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15, d16, d17, d18, d19, d20 As String
Dim e1 As String
    Dim a, b, c, d, e, g As String
    Dim SearchString, SearchChar, MyPos As String
    Dim f As Integer
   grs.CursorLocation = adUseClient
   grs.Open "select * from " & biaoming & " order by 工程编号", gconn, adOpenKeyset, adLockPessimistic
   

    If Form17.Text2.Text = "" Then
       ln = MsgBox("工程编号不能为空,请重新输入!", vbInformation, "提示")
        Text2.Text = ""
        grs.Close
    Exit Sub
    End If
   
   If Form17.Text2.Text <> "" Then
'   If biaoming = "计划内" Or biaoming = "零星验字工程" Then
'       Text2.Text = Text2.Text
'   End If
   If biaoming <> "计划内" And biaoming <> "零星验字工程" Then
   a = Form17.Text2.Text
   f = Len(a)
   SearchString = a ' 被搜索的字符串。
   SearchChar = "-"   ' 要查找字符串 "P"。
   MyPos = InStr(1, SearchString, SearchChar, 1)
   If MyPos = 0 Then
        ln = MsgBox("输入格式不对,请重新输入!", vbInformation, "提示")
        Text2.Text = ""
        grs.Close
    Exit Sub
   End If
    If MyPos <> "0" Then
     b = left(a, MyPos - 1)
     c = right(a, f - MyPos)
     If biaoming = "定线" Then
        d = b & "设字" & c & "号"
     End If
     If biaoming = "竣工" Then
        d = b & "竣工" & c & "号"
     End If
     If biaoming = "建筑物位置测定" Then
        d = b & "验字" & c & "号"
     End If
     If biaoming = "地籍" Then
        d = b & "籍字" & c & "号"
     End If
     If biaoming = "松北" Then
        d = b & "松北" & c & "号"
     End If
     Text2.Text = d
   End If
End If
End If
  For i = 1 To grs.RecordCount
      g = grs.Fields(1)
   If Text2.Text = g Then
       ln = MsgBox("该工程编号已存在,请重新输入!", vbInformation, "提示")
        Text2.Text = ""
        grs.Close
    Exit Sub
   End If
   grs.MoveNext
   Next
With grs
     .AddNew
  If Text1.Text = "" Then
   c1 = "0"
  End If
  If Text1.Text <> "" Then
   c1 = Text1.Text
  End If
  If Text2.Text = "" Then
   c2 = "0"
  End If
  If Text2.Text <> "" Then
   c2 = Text2.Text
  End If
  If Text3.Text = "" Then
   e1 = "0"
  End If
  If Text3.Text <> "" Then
   e1 = Text3.Text
  End If
  If Combo1.Text = "" Then
   d1 = "0"
  End If
  If Combo1.Text <> "" Then
   d1 = Combo1.Text
  End If
  If Combo2.Text = "" Then
   d2 = "0"
  End If
  If Combo2.Text <> "" Then
   d2 = Combo2.Text
  End If


If Text6.Text <> "" Or Text7.Text <> "" Or Text8.Text <> "" Or Text9.Text <> "" Then
   If Text6.Text = "" Then
      a1 = 0
   End If
   If Text6.Text <> "" Then
      a1 = Text6.Text
   End If
   If Text7.Text = "" Then
      a2 = 0
   End If
   If Text7.Text <> "" Then
      a2 = Text7.Text
   End If
    If Text8.Text = "" Then
      a3 = 1
   End If
    If Text8.Text <> "" Then
     a3 = Text8.Text
   End If
   If Text9.Text = "" Then
      a4 = 1
   End If
   If Text9.Text <> "" Then
      a4 = Text9.Text
   End If
End If
   If Text10.Text = "" Then
      b1 = 0
   End If
   If Text10.Text <> "" Then
      b1 = Text10.Text
   End If
  If Combo3.Text = "" Then
   d3 = "0"
  End If
  If Combo3.Text <> "" Then
   d3 = Combo3.Text
  End If
   If Combo4.Text = "" Then
   d4 = "0"
  End If
  If Combo4.Text <> "" Then
   d4 = Combo4.Text
  End If


If Text13.Text <> "" Or Text14.Text <> "" Or Text15.Text <> "" Or Text16.Text <> "" Then
   If Text13.Text = "" Then
      a5 = 0
   End If
   If Text13.Text <> "" Then
      a5 = Text13.Text
   End If
   If Text14.Text = "" Then
      a6 = 0
   End If
   If Text14.Text <> "" Then
      a6 = Text14.Text
   End If
   If Text15.Text = "" Then
      a7 = 1
   End If
   If Text15.Text <> "" Then
      a7 = Text15.Text
   End If
   If Text16.Text = "" Then
      a8 = 1
   End If
   If Text16.Text <> "" Then
      a8 = Text16.Text
   End If
End If
   If Text17.Text = "" Then
      b2 = 0
   End If
   If Text17.Text <> "" Then
      b2 = Text17.Text
   End If
  If Combo5.Text = "" Then
   d5 = "0"
  End If
  If Combo5.Text <> "" Then
   d5 = Combo5.Text
  End If
   If Combo6.Text = "" Then
   d6 = "0"
  End If
  If Combo6.Text <> "" Then
   d6 = Combo6.Text
  End If


If Text20.Text <> "" Or Text21.Text <> "" Or Text22.Text <> "" Or Text23.Text <> "" Then
   If Text20.Text = "" Then
      a9 = 0
   End If
   If Text20.Text <> "" Then
      a9 = Text20.Text
   End If
   If Text21.Text = "" Then
      a10 = 0
   End If
   If Text21.Text <> "" Then
      a10 = Text21.Text
   End If
   If Text22.Text = "" Then
      a11 = 1
   End If
   If Text22.Text <> "" Then
      a11 = Text22.Text
   End If
   If Text23.Text = "" Then
      a12 = 1
   End If
   If Text23.Text <> "" Then
      a12 = Text23.Text
   End If
End If

   If Text24.Text = "" Then
      b3 = 0
   End If
   If Text24.Text <> "" Then
      b3 = Text24.Text
   End If
  If Combo7.Text = "" Then
   d7 = "0"
  End If
  If Combo7.Text <> "" Then
   d7 = Combo7.Text
  End If
   If Combo8.Text = "" Then
   d8 = "0"
  End If
  If Combo8.Text <> "" Then
   d8 = Combo8.Text
  End If

If Text27.Text <> "" Or Text28.Text <> "" Or Text29.Text <> "" Or Text30.Text <> "" Then
   If Text27.Text = "" Then
      a13 = 0
   End If
   If Text27.Text <> "" Then
      a13 = Text27.Text
   End If
   If Text28.Text = "" Then
      a14 = 0
   End If
   If Text28.Text <> "" Then
      a14 = Text28.Text
   End If
   If Text29.Text = "" Then
      a15 = 1
   End If
   If Text29.Text <> "" Then
      a15 = Text29.Text
   End If
   If Text30.Text = "" Then
      a16 = 1
   End If
   If Text30.Text <> "" Then
      a16 = Text30.Text
   End If
End If
   If Text31.Text = "" Then
      b4 = 0
   End If
   If Text31.Text <> "" Then
      b4 = Text31.Text
   End If

  If Combo9.Text = "" Then
   d9 = "0"
  End If
  If Combo9.Text <> "" Then
   d9 = Combo9.Text
  End If
   If Combo10.Text = "" Then
   d10 = "0"
  End If
  If Combo10.Text <> "" Then
   d10 = Combo10.Text
  End If


If Text34.Text <> "" Or Text35.Text <> "" Or Text36.Text <> "" Or Text37.Text <> "" Then
   If Text34.Text = "" Then
      a17 = 0
   End If
   If Text34.Text <> "" Then
      a17 = Text34.Text
   End If
   If Text35.Text = "" Then
      a18 = 0
   End If
   If Text35.Text <> "" Then
      a18 = Text35.Text
   End If
   If Text36.Text = "" Then
      a19 = 1
   End If
   If Text36.Text <> "" Then
      a19 = Text36.Text
   End If
   If Text37.Text = "" Then
      a20 = 1
   End If
   If Text37.Text <> "" Then
      a20 = Text37.Text
   End If

End If
   If Text38.Text = "" Then
      b5 = 0
   End If
   If Text38.Text <> "" Then
      b5 = Text38.Text
   End If
  If Combo11.Text = "" Then
   d11 = "0"
  End If
  If Combo11.Text <> "" Then
   d11 = Combo11.Text
  End If
   If Combo12.Text = "" Then
   d12 = "0"
  End If
  If Combo12.Text <> "" Then
   d12 = Combo12.Text
  End If

If Text41.Text <> "" Or Text42.Text <> "" Or Text43.Text <> "" Or Text44.Text <> "" Then
   If Text41.Text = "" Then
      a22 = 0
   End If
   If Text41.Text <> "" Then
      a22 = Text41.Text
   End If
   If Text42.Text = "" Then
      a23 = 0
   End If
   If Text42.Text <> "" Then
      a23 = Text42.Text
   End If
   If Text43.Text = "" Then
      a24 = 1
   End If
   If Text43.Text <> "" Then
      a24 = Text43.Text
   End If
   If Text44.Text = "" Then
      a25 = 1
   End If
   If Text44.Text <> "" Then
      a25 = Text44.Text
   End If

End If
   If Text45.Text = "" Then
      b6 = 0
   End If
   If Text45.Text <> "" Then
      b6 = Text45.Text
   End If

  If Combo13.Text = "" Then
   d13 = "0"
  End If
  If Combo13.Text <> "" Then
   d13 = Combo13.Text
  End If
   If Combo14.Text = "" Then
   d14 = "0"
  End If
  If Combo14.Text <> "" Then
   d14 = Combo14.Text
  End If



If Text48.Text <> "" Or Text49.Text <> "" Or Text50.Text <> "" Or Text51.Text <> "" Then
   If Text48.Text = "" Then
      a27 = 0
   End If
   If Text48.Text <> "" Then
      a27 = Text48.Text
   End If
   If Text49.Text = "" Then
      a28 = 0
   End If
   If Text49.Text <> "" Then
      a28 = Text49.Text
   End If
   If Text50.Text = "" Then
      a29 = 1
   End If
   If Text50.Text <> "" Then
      a29 = Text50.Text
   End If
   If Text51.Text = "" Then
      a30 = 1
   End If

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -