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

📄 frmstoreedit.frm

📁 电脑销售管理系统是典型的信息管理系统(MIS)
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmstoreedit 
   Caption         =   "编辑仓库信息"
   ClientHeight    =   2430
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   Icon            =   "frmstoreedit.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   2430
   ScaleWidth      =   4680
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton cmd_cancel 
      Caption         =   "取消"
      Height          =   375
      Left            =   2760
      MouseIcon       =   "frmstoreedit.frx":0CCA
      MousePointer    =   99  'Custom
      TabIndex        =   6
      Top             =   1920
      Width           =   1095
   End
   Begin VB.CommandButton cmd_ok 
      Caption         =   "确定"
      Height          =   375
      Left            =   720
      MouseIcon       =   "frmstoreedit.frx":0FD4
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   5
      Top             =   1920
      Width           =   1095
   End
   Begin VB.Frame Frame1 
      Height          =   1575
      Left            =   360
      TabIndex        =   0
      Top             =   120
      Width           =   3855
      Begin VB.TextBox txtdescribe 
         Height          =   615
         Left            =   1200
         MaxLength       =   100
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   4
         Top             =   720
         Width           =   2295
      End
      Begin VB.TextBox txtstore 
         Height          =   270
         Left            =   1200
         MaxLength       =   100
         TabIndex        =   3
         Top             =   360
         Width           =   2295
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "描述信息"
         Height          =   180
         Left            =   240
         TabIndex        =   2
         Top             =   720
         Width           =   720
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "仓库名称"
         Height          =   180
         Left            =   240
         TabIndex        =   1
         Top             =   360
         Width           =   720
      End
   End
End
Attribute VB_Name = "frmstoreedit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public OriName As String
Public OriId As Long

Private Function Check() As Boolean
  If Trim(txtstore) = "" Then
    MsgBox "请输入仓库名称"
    txtstore.SetFocus
    Check = False
    Exit Function
  End If
  
  Check = True
End Function

Private Sub Cmd_OK_Click()
  If Check = False Then
    Exit Sub
  End If
  
  With MyStore
  .StoreName = MakeStr(txtstore)
  .Describe = MakeStr(txtDescribe)
  '判断仓库名称是否存在
  If Modify = False Or OriName <> Trim(txtstore) Then
    If .In_DB(MakeStr(txtstore)) = True Then
      MsgBox "仓库名称已经存在,请重新输入"
      txtstore.SetFocus
      txtstore.SelStart = 0
      txtstore.SelLength = Len(txtstore)
      Exit Sub
    End If
  End If
  
  If Modify = False Then
    .Insert
    MsgBox "添加成功"
  Else
    .Update (OriId)
    MsgBox "修改成功"
  End If
    
  End With
  Unload Me
End Sub

Private Sub Cmd_Cancel_Click()
  Unload Me
End Sub




Private Sub txtDescribe_KeyPress(KeyAscii As Integer)
  EnterTAB (KeyAscii)
End Sub

Private Sub txtStore_KeyPress(KeyAscii As Integer)
  EnterTAB (KeyAscii)
End Sub

⌨️ 快捷键说明

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