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

📄 main_scgl_scgzgl_lr.frm

📁 EMS是一个企业营销管理系统,功能强大,供大家享用,希望大家多多支持!!
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0"; "MSMASK32.OCX"
Begin VB.Form main_scgl_scgzgl_lr 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Form1"
   ClientHeight    =   3060
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   6300
   Icon            =   "main_scgl_scgzgl_lr.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3060
   ScaleWidth      =   6300
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   390
      Left            =   1410
      TabIndex        =   10
      Top             =   2535
      Width           =   1770
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   390
      Left            =   3300
      TabIndex        =   9
      Top             =   2535
      Width           =   1770
   End
   Begin VB.Frame Frame1 
      Height          =   2460
      Left            =   30
      TabIndex        =   0
      Top             =   -60
      Width           =   6240
      Begin VB.CommandButton cmdCP 
         Caption         =   "…"
         Height          =   270
         Left            =   5670
         TabIndex        =   19
         Top             =   195
         Width           =   375
      End
      Begin MSComCtl2.DTPicker DTPicker1 
         Height          =   330
         Left            =   930
         TabIndex        =   17
         Top             =   1995
         Width           =   2070
         _ExtentX        =   3651
         _ExtentY        =   582
         _Version        =   393216
         Format          =   48562177
         CurrentDate     =   38721
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   4
         Left            =   3795
         TabIndex        =   16
         Top             =   1635
         Width           =   2265
      End
      Begin MSMask.MaskEdBox MaskEdBox1 
         Height          =   330
         Left            =   930
         TabIndex        =   14
         Top             =   1620
         Width           =   2070
         _ExtentX        =   3651
         _ExtentY        =   582
         _Version        =   393216
         MaxLength       =   8
         Mask            =   "####年##月"
         PromptChar      =   "_"
      End
      Begin VB.TextBox txtID 
         Height          =   330
         Left            =   4935
         TabIndex        =   12
         Top             =   525
         Visible         =   0   'False
         Width           =   1140
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   1
         Left            =   930
         TabIndex        =   4
         Top             =   525
         Width           =   3495
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   2
         Left            =   930
         TabIndex        =   3
         Top             =   885
         Width           =   5145
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   3
         Left            =   930
         TabIndex        =   2
         Top             =   1245
         Width           =   5145
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   0
         Left            =   930
         TabIndex        =   1
         Top             =   165
         Width           =   5145
      End
      Begin VB.Label Label6 
         Caption         =   "录入日期"
         Height          =   165
         Left            =   150
         TabIndex        =   18
         Top             =   2085
         Width           =   735
      End
      Begin VB.Label Label5 
         Caption         =   "跟踪人"
         Height          =   165
         Left            =   3165
         TabIndex        =   15
         Top             =   1725
         Width           =   570
      End
      Begin VB.Label Label3 
         Caption         =   "跟踪月份"
         Height          =   165
         Left            =   180
         TabIndex        =   13
         Top             =   1695
         Width           =   735
      End
      Begin VB.Label lblID 
         BackStyle       =   0  'Transparent
         Caption         =   "ID"
         Height          =   180
         Left            =   4575
         TabIndex        =   11
         Top             =   585
         Visible         =   0   'False
         Width           =   225
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "品名规格"
         ForeColor       =   &H000000FF&
         Height          =   165
         Left            =   165
         TabIndex        =   8
         Top             =   240
         Width           =   735
      End
      Begin VB.Label Label2 
         Caption         =   "市场价格"
         Height          =   165
         Left            =   150
         TabIndex        =   7
         Top             =   600
         Width           =   750
      End
      Begin VB.Label Label4 
         Caption         =   "市场信息"
         Height          =   165
         Left            =   135
         TabIndex        =   6
         Top             =   975
         Width           =   810
      End
      Begin VB.Label Label8 
         Caption         =   "备注"
         Height          =   165
         Left            =   525
         TabIndex        =   5
         Top             =   1320
         Width           =   375
      End
   End
End
Attribute VB_Name = "main_scgl_scgzgl_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 cmdCP_Click()
  intCP = 1
  Load main_cpxx
  main_cpxx.Show 1
End Sub

Private Sub Command2_Click()
  Unload Me
End Sub
Private Sub Form_Activate()
  Text1(0).SetFocus
End Sub
Private Sub Form_Load()
  If blnAddSCGZ = True Then
     Me.Caption = "市场跟踪信息添加"
     For i = 1 To Text1.UBound
       Text1(i) = ""
     Next i
  Else
     Me.Caption = "市场跟踪信息修改"
     With main_scgl_scgzgl.Adodc1.Recordset
       lblID.Visible = True
       txtID.Visible = True
       txtID.text = .Fields("ID")
       For i = 0 To 4
         Text1(i) = .Fields(i + 1)
       Next i
       If MaskEdBox1 <> "" Then MaskEdBox1 = .Fields(5)
       Text1(4) = .Fields(6)
       DTPicker1.Value = .Fields(7)
     End With
  End If
End Sub
Private Sub MaskEdBox1_KeyDown(KeyCode As Integer, Shift As Integer)
  If KeyCode = vbKeyReturn Then Text1(4).SetFocus
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 = 0 Then cmdCP.SetFocus
  If KeyCode = vbKeyReturn And Index >= 1 And Index < 3 Then Text1(Index + 1).SetFocus
  If KeyCode = vbKeyReturn And Index = 3 Then MaskEdBox1.SetFocus
  If KeyCode = vbKeyReturn And Index = 4 Then DTPicker1.SetFocus
End Sub
Private Sub Text1_LostFocus(Index As Integer)
  Text1(Index).BackColor = &H80000005
End Sub
Private Sub Command1_Click()
  On Error GoTo SaveErr
  If blnAddSCGZ = True Then
     Cnn.Execute ("insert into 市场跟踪表 values('" + Text1(0) + "'," + Text1(1) + ",'" + Text1(2) + _
     "','" + Text1(3) + "','" + MaskEdBox1 + "','" + Text1(4) + "','" + Str(DTPicker1) + "')")
  Else
    Cnn.Execute ("update 市场跟踪表 set 品名规格='" + Text1(0) + "',市场价格=" + Text1(1) + ",市场信息='" + Text1(2) + _
    "',备注='" + Text1(3) + "',跟踪月份='" + MaskEdBox1 + "',跟踪人='" + Text1(4) + "',录入日期='" + Str(DTPicker1) + _
    "'where ID =" + txtID + "")
  End If
  main_scgl_scgzgl.Adodc1.Refresh
  If SCGZBookmark <> "" Then main_scgl_scgzgl.DataGrid1.Bookmark = SCGZBookmark
  Unload Me
  Exit Sub
SaveErr:
  MsgBox Err.Description
End Sub

⌨️ 快捷键说明

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