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

📄 main_yxzy_qymlgl_lr.frm

📁 EMS是一个企业营销管理系统,功能强大,供大家享用,希望大家多多支持!!
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form main_yxzy_qymlgl_lr 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Form1"
   ClientHeight    =   3810
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   6075
   Icon            =   "main_yxzy_qymlgl_lr.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3810
   ScaleWidth      =   6075
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   390
      Left            =   1230
      TabIndex        =   12
      Top             =   3270
      Width           =   1770
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   390
      Left            =   3120
      TabIndex        =   11
      Top             =   3270
      Width           =   1770
   End
   Begin VB.Frame Frame1 
      Height          =   3195
      Left            =   30
      TabIndex        =   0
      Top             =   -60
      Width           =   6045
      Begin VB.TextBox txtID 
         Height          =   330
         Left            =   4110
         Locked          =   -1  'True
         TabIndex        =   32
         Top             =   165
         Visible         =   0   'False
         Width           =   1875
      End
      Begin MSComCtl2.DTPicker DTPicker1 
         Height          =   300
         Left            =   825
         TabIndex        =   29
         Top             =   2745
         Width           =   2355
         _ExtentX        =   4154
         _ExtentY        =   529
         _Version        =   393216
         Format          =   48758785
         CurrentDate     =   38719
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   11
         Left            =   4005
         TabIndex        =   27
         Top             =   2745
         Width           =   1965
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   10
         Left            =   825
         TabIndex        =   25
         Top             =   2370
         Width           =   5160
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   9
         Left            =   4005
         TabIndex        =   23
         Top             =   1995
         Width           =   1965
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   8
         Left            =   825
         TabIndex        =   21
         Top             =   1995
         Width           =   2340
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   7
         Left            =   4005
         TabIndex        =   19
         Top             =   1620
         Width           =   1965
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   6
         Left            =   825
         TabIndex        =   17
         Top             =   1620
         Width           =   2340
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         Left            =   4005
         Style           =   2  'Dropdown List
         TabIndex        =   16
         Top             =   1260
         Width           =   1965
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   5
         Left            =   825
         TabIndex        =   13
         Top             =   1245
         Width           =   2340
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   1
         Left            =   825
         TabIndex        =   5
         Top             =   525
         Width           =   1125
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   2
         Left            =   2460
         TabIndex        =   4
         Top             =   525
         Width           =   3525
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   3
         Left            =   825
         TabIndex        =   3
         Top             =   885
         Width           =   2340
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   0
         Left            =   825
         TabIndex        =   2
         Top             =   165
         Width           =   2865
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   4
         Left            =   3630
         TabIndex        =   1
         Top             =   885
         Width           =   2340
      End
      Begin VB.Label lblID 
         BackStyle       =   0  'Transparent
         Caption         =   "ID"
         Height          =   180
         Left            =   3795
         TabIndex        =   31
         Top             =   240
         Visible         =   0   'False
         Width           =   225
      End
      Begin VB.Label Label14 
         Caption         =   "注册日期"
         Height          =   165
         Left            =   60
         TabIndex        =   30
         Top             =   2805
         Width           =   795
      End
      Begin VB.Label Label13 
         Caption         =   "注册资金"
         Height          =   165
         Left            =   3225
         TabIndex        =   28
         Top             =   2805
         Width           =   795
      End
      Begin VB.Label Label12 
         Caption         =   "相关产品"
         Height          =   165
         Left            =   60
         TabIndex        =   26
         Top             =   2460
         Width           =   1140
      End
      Begin VB.Label Label11 
         Caption         =   "行业信息"
         Height          =   165
         Left            =   3255
         TabIndex        =   24
         Top             =   2070
         Width           =   795
      End
      Begin VB.Label Label10 
         Caption         =   "员工人数"
         Height          =   165
         Left            =   45
         TabIndex        =   22
         Top             =   2085
         Width           =   795
      End
      Begin VB.Label Label9 
         Caption         =   "资产总额"
         Height          =   165
         Left            =   3210
         TabIndex        =   20
         Top             =   1710
         Width           =   795
      End
      Begin VB.Label Label7 
         Caption         =   "销售额"
         Height          =   165
         Left            =   225
         TabIndex        =   18
         Top             =   1710
         Width           =   795
      End
      Begin VB.Label Label5 
         Caption         =   "是否上市"
         Height          =   180
         Left            =   3210
         TabIndex        =   15
         Top             =   1365
         Width           =   780
      End
      Begin VB.Label Label3 
         Caption         =   "传真"
         Height          =   165
         Left            =   420
         TabIndex        =   14
         Top             =   1335
         Width           =   795
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "企业名称"
         ForeColor       =   &H000000FF&
         Height          =   165
         Left            =   75
         TabIndex        =   10
         Top             =   240
         Width           =   735
      End
      Begin VB.Label Label2 
         Caption         =   "负责人"
         Height          =   165
         Left            =   60
         TabIndex        =   9
         Top             =   585
         Width           =   795
      End
      Begin VB.Label Label4 
         Caption         =   "地址"
         Height          =   165
         Left            =   2025
         TabIndex        =   8
         Top             =   630
         Width           =   405
      End
      Begin VB.Label Label8 
         Caption         =   "邮编"
         Height          =   165
         Left            =   420
         TabIndex        =   7
         Top             =   975
         Width           =   795
      End
      Begin VB.Label Label6 
         Caption         =   "电话"
         Height          =   165
         Left            =   3210
         TabIndex        =   6
         Top             =   990
         Width           =   735
      End
   End
End
Attribute VB_Name = "main_yxzy_qymlgl_lr"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs1 As New ADODB.Recordset
Private Sub Form_Activate()
  Text1(0).SetFocus
End Sub
Private Sub Form_Load()
  Combo1.AddItem "否"
  Combo1.AddItem "是"
  Combo1.ListIndex = 0
  If blnAddQYML = True Then
     Me.Caption = "企业信息添加"
     For i = 1 To Text1.UBound
       Text1(i) = ""
     Next i
  Else
     Me.Caption = "企业信息修改"
     With main_yxzy_qymlgl.Adodc1.Recordset
       lblID.Visible = True
       txtID.Visible = True
       txtID.text = .Fields("ID")
       For i = 0 To 5
         Text1(i) = .Fields(i + 1)
       Next i
       Combo1 = .Fields("是否上市")
       For i = 6 To 10
         Text1(i) = .Fields(i + 2)
       Next i
       DTPicker1 = .Fields("注册日期")
       Text1(11) = .Fields("注册资金")
     End With
  End If
End Sub
Private Sub Text1_GotFocus(Index As Integer)
  Text1(Index).BackColor = &HFFFF00
  Text1(Index).SelStart = 0
  Text1(Index).SelLength = Len(Text1(Index))
End Sub
Private Sub Text1_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
  If KeyCode = vbKeyReturn And Index < 5 Then Text1(Index + 1).SetFocus
  If KeyCode = vbKeyReturn And Index = 5 Then Combo1.SetFocus
  If KeyCode = vbKeyReturn And Index >= 6 And Index < 10 Then Text1(Index + 1).SetFocus
  If KeyCode = vbKeyReturn And Index = 10 Then DTPicker1.SetFocus
  If KeyCode = vbKeyReturn And Index = 11 Then Command1.SetFocus
End Sub
Private Sub Text1_LostFocus(Index As Integer)
  Text1(Index).BackColor = &H80000005
End Sub
Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
  If KeyCode = vbKeyReturn Then Text1(6).SetFocus
End Sub
Private Sub DTPicker1_KeyDown(KeyCode As Integer, Shift As Integer)
  If KeyCode = vbKeyReturn Then Text1(11).SetFocus
End Sub
Private Sub Command1_Click()
  On Error GoTo SaveErr
  If blnAddQYML = True Then
     Cnn.Execute ("insert into 企业名录表 values('" + Text1(0) + "','" + Text1(1) + "','" + Text1(2) + _
     "','" + Text1(3) + "','" + Text1(4) + "','" + Text1(5) + "','" + Combo1 + "','" + Text1(6) + _
     "','" + Text1(7) + "','" + Text1(8) + "','" + Text1(9) + "','" + Text1(10) + "','" + Str(DTPicker1) + _
     "','" + Text1(11) + "')")
  Else
    Cnn.Execute ("update 企业名录表 set 企业名称='" + Text1(0) + "',负责人='" + Text1(1) + "',地址='" + Text1(2) + _
    "',邮编='" + Text1(3) + "',电话='" + Text1(4) + "',传真='" + Text1(5) + "',是否上市='" + Combo1 + _
    "',销售额='" + Text1(6) + "',资产总额='" + Text1(7) + "',员工人数='" + Text1(8) + "',行业信息='" + Text1(9) + _
    "',相关产品='" + Text1(10) + "',注册日期='" + Str(DTPicker1) + "',注册资金='" + Text1(11) + "'where ID =" + txtID + "")
  End If
  main_yxzy_qymlgl.Adodc1.Refresh
  If YQMLBookmark <> "" Then main_yxzy_qymlgl.DataGrid1.Bookmark = YQMLBookmark
  Unload Me
  Exit Sub
SaveErr:
  MsgBox Err.Description
End Sub
Private Sub Command2_Click()
  Unload Me
End Sub

⌨️ 快捷键说明

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