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

📄 add_stands.frm

📁 TMS(小型票务管理VB+Access)
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form Add_stands 
   BorderStyle     =   0  'None
   Caption         =   "Add Stand to database"
   ClientHeight    =   3015
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   3510
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   3015
   ScaleWidth      =   3510
   ShowInTaskbar   =   0   'False
   Begin MSComctlLib.Slider Slider1 
      Height          =   1815
      Left            =   2640
      TabIndex        =   6
      Top             =   480
      Width           =   495
      _ExtentX        =   873
      _ExtentY        =   3201
      _Version        =   393216
      Orientation     =   1
      Max             =   2
      SelStart        =   1
      TickStyle       =   1
      Value           =   1
      TextPosition    =   1
   End
   Begin VB.TextBox Text2 
      Height          =   285
      Left            =   360
      TabIndex        =   5
      Top             =   1920
      Width           =   1575
   End
   Begin VB.TextBox Text1 
      Height          =   285
      Left            =   360
      TabIndex        =   4
      Top             =   600
      Width           =   1575
   End
   Begin VB.Data DatStands 
      Caption         =   "Data1"
      Connect         =   "Access"
      DatabaseName    =   "tennis.mdb"
      DefaultCursorType=   0  'DefaultCursor
      DefaultType     =   2  'UseODBC
      Exclusive       =   0   'False
      Height          =   345
      Left            =   0
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   "Stands"
      Top             =   0
      Visible         =   0   'False
      Width           =   1065
   End
   Begin VB.CommandButton Command2 
      BackColor       =   &H00E0E0E0&
      Caption         =   "Cancel"
      Height          =   255
      Left            =   2040
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   2400
      Width           =   1095
   End
   Begin VB.CommandButton add 
      BackColor       =   &H00E0E0E0&
      Caption         =   "Add"
      Height          =   255
      Left            =   360
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   2400
      Width           =   1095
   End
   Begin VB.Label Label4 
      BackColor       =   &H00E0E0E0&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Insert string for the stand's type"
      Height          =   615
      Left            =   360
      TabIndex        =   8
      Top             =   1080
      Visible         =   0   'False
      Width           =   1575
   End
   Begin VB.Label Label3 
      BackColor       =   &H00E0E0E0&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Insert string for the new stand's name"
      Height          =   615
      Left            =   360
      TabIndex        =   7
      Top             =   1080
      Visible         =   0   'False
      Width           =   1575
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "Name"
      Height          =   255
      Left            =   2040
      TabIndex        =   2
      Top             =   600
      Width           =   495
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "Type"
      Height          =   255
      Left            =   2040
      TabIndex        =   3
      Top             =   1920
      Width           =   495
   End
   Begin VB.Shape Shape1 
      BorderWidth     =   4
      FillColor       =   &H00808080&
      FillStyle       =   4  'Upward Diagonal
      Height          =   2775
      Left            =   120
      Top             =   120
      Width           =   3255
   End
End
Attribute VB_Name = "Add_stands"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub add_Click()
Dim RSlast
   Set DBtennis = DBEngine.Workspaces(0). _
   OpenDatabase("tennis.MDB")
   Set RSlast = DBtennis.OpenRecordset("last_num", dbOpenDynaset)
With RSlast
 .MoveFirst
 .MoveFirst
 .Edit
 !last_num = !last_num
 lastnum = !last_num
 !last_num = !last_num + 1
End With



  With DatStands.Recordset
  .AddNew
   !nom = Text1
   !Type = Text2
   !Num = lastnum
  .Update
  End With
  MsgBox "entry saved!", 48, "NEW"
  Unload Me
  'EditMain.DatStands.Refresh
  DB_explore.rebuild
End Sub

Private Sub add_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  add.FontBold = True
  Command2.FontBold = False
End Sub

Private Sub Command2_Click()
  Unload Me
End Sub
Private Sub Command2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  Command2.FontBold = True
  add.FontBold = False
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    add.FontBold = False
    Command2.FontBold = False
End Sub



Private Sub Slider1_Click()
  If Slider1 = 0 Then
      Text1.Enabled = True
      Text2.Enabled = False
      Slider1.text = "Name active"
      Label3.Visible = True
      Label4.Visible = False
    ElseIf Slider1 = 1 Then
      Slider1.text = "Name and type active"
      Text1.Enabled = True
      Text2.Enabled = True
      Label3.Visible = False
      Label4.Visible = False
    ElseIf Slider1 = 2 Then
    Slider1.text = "Type active"
    Text1.Enabled = False
    Text2.Enabled = True
    Label3.Visible = False
    Label4.Visible = True
  End If
End Sub

⌨️ 快捷键说明

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