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

📄 frm_yplxtj.frm

📁 网络化管理解决了实际工作中不能及时对连锁店销售情况进行统一管理的问题
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Frm_yplxtj 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "药品类型添加"
   ClientHeight    =   2970
   ClientLeft      =   5460
   ClientTop       =   4275
   ClientWidth     =   4335
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2970
   ScaleWidth      =   4335
   Begin VB.Frame Frame2 
      Height          =   855
      Left            =   120
      TabIndex        =   7
      Top             =   2040
      Width           =   4095
      Begin VB.CommandButton Cmdok 
         Caption         =   "添加"
         Height          =   375
         Left            =   720
         TabIndex        =   2
         Top             =   240
         Width           =   855
      End
      Begin VB.CommandButton Cmdexit 
         Caption         =   "取消"
         Height          =   375
         Left            =   2400
         TabIndex        =   3
         Top             =   240
         Width           =   855
      End
   End
   Begin VB.Frame Frame1 
      Height          =   2055
      Left            =   120
      TabIndex        =   4
      Top             =   0
      Width           =   4095
      Begin VB.TextBox Text1 
         Height          =   375
         Index           =   0
         Left            =   1800
         TabIndex        =   0
         Top             =   360
         Width           =   2055
      End
      Begin VB.TextBox Text1 
         Height          =   375
         Index           =   1
         Left            =   1800
         TabIndex        =   1
         Top             =   1320
         Width           =   2055
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "药品类型编号"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   240
         TabIndex        =   6
         Top             =   360
         Width           =   1335
      End
      Begin VB.Label Label2 
         BackStyle       =   0  'Transparent
         Caption         =   "药品类型名称"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   240
         TabIndex        =   5
         Top             =   1440
         Width           =   1335
      End
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   3120
      Top             =   0
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=shop"
      OLEDBString     =   "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=shop"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from 药品类型表"
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
End
Attribute VB_Name = "Frm_yplxtj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Activate()
  Text1(1).SetFocus
  Adodc1.RecordSource = "select * from 药品类型表 order by 药品类型编号"
  Adodc1.Refresh
  If Adodc1.Recordset.RecordCount > 0 Then
     Adodc1.Recordset.MoveLast
     Text1(0).Text = Format(Adodc1.Recordset.Fields("药品类型编号") + 1, "0")
  Else
     Text1(0).Text = "1"
  End If
End Sub
Private Sub Cmdexit_Click()
Unload Me
End Sub

Private Sub Cmdok_Click()
Dim AdoRs As New ADODB.Recordset
Dim sql As String
If Text1(0).Text = "" Or Text1(1).Text = "" Then
        MsgBox "重要内容不能为空!"
        Text1(0).SetFocus
        Exit Sub
End If
 AdoRs.Open "select * from 药品类型表", cnn, adOpenKeyset, adLockOptimistic
  AdoRs.AddNew
  For i = 0 To 1
      AdoRs.Fields(i) = Text1(i).Text
  Next i
  AdoRs.Update
  AdoRs.Close
  Frm_yplxlb.Adodc1.Refresh
  Unload Me
End Sub

⌨️ 快捷键说明

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