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

📄 main_fzgj_jsb.frm

📁 这是个进销存管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            Caption         =   "标题"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column03 
            DataField       =   "内容"
            Caption         =   "内容"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            MarqueeStyle    =   4
            BeginProperty Column00 
               ColumnWidth     =   540.284
            EndProperty
            BeginProperty Column01 
               ColumnWidth     =   1019.906
            EndProperty
            BeginProperty Column02 
               ColumnWidth     =   2534.74
            EndProperty
            BeginProperty Column03 
               ColumnWidth     =   6284.977
            EndProperty
         EndProperty
      End
      Begin VB.Frame Frame1 
         Height          =   3765
         Left            =   -74865
         TabIndex        =   7
         Top             =   405
         Width           =   9795
         Begin MSAdodcLib.Adodc Adodc1 
            Height          =   390
            Left            =   5085
            Top             =   2370
            Visible         =   0   'False
            Width           =   1860
            _ExtentX        =   3281
            _ExtentY        =   688
            ConnectMode     =   0
            CursorLocation  =   3
            IsolationLevel  =   -1
            ConnectionTimeout=   15
            CommandTimeout  =   30
            CursorType      =   3
            LockType        =   3
            CommandType     =   1
            CursorOptions   =   0
            CacheSize       =   50
            MaxRecords      =   0
            BOFAction       =   0
            EOFAction       =   0
            ConnectStringType=   1
            Appearance      =   1
            BackColor       =   -2147483643
            ForeColor       =   -2147483640
            Orientation     =   0
            Enabled         =   -1
            Connect         =   ""
            OLEDBString     =   ""
            OLEDBFile       =   ""
            DataSourceName  =   ""
            OtherAttributes =   ""
            UserName        =   ""
            Password        =   ""
            RecordSource    =   ""
            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
         Begin VB.TextBox txtDate 
            BackColor       =   &H80000018&
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   285
            Left            =   5040
            TabIndex        =   17
            Top             =   270
            Width           =   1455
         End
         Begin VB.CommandButton cmdEnd 
            Caption         =   "退出(&E)"
            Height          =   315
            Left            =   8640
            TabIndex        =   13
            Top             =   270
            Width           =   1005
         End
         Begin VB.TextBox txtTitle 
            BackColor       =   &H80000018&
            Height          =   300
            Left            =   1035
            TabIndex        =   11
            Top             =   270
            Width           =   3240
         End
         Begin VB.CommandButton cmdSave 
            Caption         =   "保存(&S)"
            Height          =   315
            Left            =   7650
            TabIndex        =   10
            Top             =   270
            Width           =   1005
         End
         Begin VB.CommandButton cmdAdd 
            Caption         =   "记事(&J)"
            Height          =   315
            Left            =   6660
            TabIndex        =   9
            Top             =   270
            Width           =   1005
         End
         Begin VB.TextBox txtMemo 
            BackColor       =   &H80000018&
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   2970
            Left            =   1050
            MultiLine       =   -1  'True
            ScrollBars      =   2  'Vertical
            TabIndex        =   8
            Top             =   660
            Width           =   8595
         End
         Begin VB.Label Label3 
            AutoSize        =   -1  'True
            Caption         =   "日期:"
            Height          =   180
            Left            =   4425
            TabIndex        =   16
            Top             =   315
            Width           =   540
         End
         Begin VB.Label Label2 
            AutoSize        =   -1  'True
            Caption         =   "记事内容:"
            Height          =   180
            Left            =   120
            TabIndex        =   14
            Top             =   645
            Width           =   900
         End
         Begin VB.Label Label1 
            AutoSize        =   -1  'True
            Caption         =   "记事标题:"
            Height          =   180
            Left            =   120
            TabIndex        =   12
            Top             =   315
            Width           =   900
         End
      End
   End
End
Attribute VB_Name = "main_fzgj_jsb"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmd_End_Click()
  Unload Me
End Sub

Private Sub CmdAdd_Click()
  txtDate.Text = Format(Date, "yyyy-mm-dd")   '将系统当前日期格式化长日期格式,供程序使用
  txtTitle.Text = ""
  txtMemo.Text = ""
  cmdSave.Enabled = True
  cmdAdd.Enabled = False
  txtDate.Enabled = True
  txtTitle.Enabled = True
  txtMemo.Enabled = True
  txtTitle.SetFocus   '使控件获得焦点
End Sub

Private Sub cmdDel_Click()
  If txt_Title.Text = "" Then
     MsgBox "请在查询选项卡中数据列表中选择你要删除的数据 !", vbOKOnly + vbQuestion, "提示"
     SSTab1.Tab = 1
     Exit Sub
  End If
  If MsgBox("是否清除当前数据? ", vbOKCancel + vbQuestion, "提示") = vbOK Then
    On Error Resume Next
    Adodc2.Recordset.Delete
    Adodc2.RecordSource = "select * from tbS_notepad"
    Adodc2.Refresh
  End If
End Sub

Private Sub CmdEnd_Click()
  Unload Me
End Sub

Private Sub cmdExit_Click()
  Unload Me
End Sub

Private Sub cmdFind_Click()
  If opTitle.Value Then
     Adodc2.RecordSource = "select * from tbS_notepad where 标题 like '" + txtFindTitle.Text + "%'"
     Adodc2.Refresh
  ElseIf opDate.Value Then
     Adodc2.RecordSource = "select * from tbS_notepad where 日期 ='" & DTPicker1.Value & "'"
     Adodc2.Refresh
  End If
End Sub

Private Sub cmdsave_Click()
  If txtTitle.Text = "" Then
     MsgBox "标题不能为空 !", vbOKOnly + vbQuestion, "提示"
     txtTitle.SetFocus   '使控件获得焦点
     Exit Sub
  End If
  Adodc1.Recordset.AddNew   '为要存储的数据开辟,存储空间
  Adodc1.Recordset.Fields(1).Value = txtDate.Text
  Adodc1.Recordset.Fields(2).Value = txtTitle.Text
  Adodc1.Recordset.Fields(3).Value = txtMemo.Text
  Adodc1.Recordset.Update    '保存数据
  Adodc1.RecordSource = "select * from tbS_notepad"
  Adodc1.Refresh
  MsgBox "记事成功!  ", vbOKOnly + vbInformation, "提示"
  cmdAdd.Enabled = True
  cmdSave.Enabled = False
  txtDate.Text = ""
  txtTitle.Text = ""
  txtMemo.Text = ""
  txtDate.Enabled = False
  txtTitle.Enabled = False
  txtMemo.Enabled = False
End Sub

Private Sub DataGrid1_Click()
  On Error Resume Next
  txt_Date.Text = DataGrid1.Columns(1).Text
  txt_Title.Text = DataGrid1.Columns(2).Text
  txt_Memo.Text = DataGrid1.Columns(3).Text
End Sub

'将DataGrid表格控件中的数据复制到 指定的文本框中
Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)

End Sub

Private Sub Form_Load()
  Adodc1.ConnectionString = PublicStr
  Adodc1.RecordSource = "select * from tbS_notepad"
  Adodc1.Refresh
  Adodc2.ConnectionString = PublicStr
  Adodc2.RecordSource = "select * from tbS_notepad"
  Adodc2.Refresh
  Set DataGrid1.DataSource = Adodc2
  txtDate.Text = ""
  txtTitle.Text = ""
  txtMemo.Text = ""
  txtDate.Enabled = False
  txtTitle.Enabled = False
  txtMemo.Enabled = False
  cmdSave.Enabled = False
End Sub

Private Sub SSTab1_Click(PreviousTab As Integer)
  If SSTab1.Tab = 0 Then
     cmdSave.Enabled = False
     cmdAdd.Enabled = True
     txtDate.Text = ""
     txtTitle.Text = ""
     txtMemo.Text = ""
     txtDate.Enabled = False
     txtTitle.Enabled = False
     txtMemo.Enabled = False
  ElseIf SSTab1.Tab = 1 Then
     Adodc2.RecordSource = "select * from tbS_notepad"
     Adodc2.Refresh
  End If
End Sub

⌨️ 快捷键说明

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