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

📄 findcash.frm

📁 一个简单的数据库操作例子,特别适合初学者.vb数据库编程练习
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form 现金帐查询 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "现金帐查询"
   ClientHeight    =   4860
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   7800
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4860
   ScaleWidth      =   7800
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame1 
      Caption         =   "现金帐查询"
      Height          =   4695
      Left            =   120
      TabIndex        =   6
      Top             =   120
      Width           =   7575
      Begin VB.ComboBox Combo1 
         Height          =   300
         Left            =   240
         TabIndex        =   0
         Top             =   720
         Width           =   1335
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Left            =   1800
         TabIndex        =   1
         Top             =   735
         Width           =   1695
      End
      Begin VB.CommandButton Command1 
         Caption         =   "查询"
         Default         =   -1  'True
         Height          =   375
         Left            =   3720
         TabIndex        =   2
         Top             =   690
         Width           =   735
      End
      Begin VB.CommandButton Command2 
         Caption         =   "修改"
         Height          =   375
         Left            =   4680
         TabIndex        =   3
         Top             =   690
         Width           =   735
      End
      Begin VB.CommandButton Command3 
         Caption         =   "打印"
         Height          =   375
         Left            =   5640
         TabIndex        =   4
         Top             =   690
         Width           =   735
      End
      Begin VB.CommandButton Command4 
         Caption         =   "退出"
         Height          =   375
         Left            =   6600
         TabIndex        =   5
         Top             =   690
         Width           =   735
      End
      Begin MSAdodcLib.Adodc Adodc1 
         Height          =   330
         Left            =   5040
         Top             =   240
         Visible         =   0   'False
         Width           =   2175
         _ExtentX        =   3836
         _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=Microsoft.Jet.OLEDB.4.0;Data Source=order.mdb;Persist Security Info=False"
         OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=order.mdb;Persist Security Info=False"
         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 MSDataGridLib.DataGrid DataGrid1 
         Height          =   3255
         Left            =   240
         TabIndex        =   7
         Top             =   1320
         Width           =   7095
         _ExtentX        =   12515
         _ExtentY        =   5741
         _Version        =   393216
         HeadLines       =   1
         RowHeight       =   15
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   2
         BeginProperty Column00 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            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 
            BeginProperty Column00 
            EndProperty
            BeginProperty Column01 
            EndProperty
         EndProperty
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "请选择查询的方式,并输入相应的编号或商品的名称"
         Height          =   180
         Left            =   480
         TabIndex        =   8
         Top             =   360
         Width           =   4140
      End
   End
End
Attribute VB_Name = "现金帐查询"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Text1.Text = "" And Combo1.Text = "" Then
Adodc1.RecordSource = "select*from 现金帐"
Adodc1.Refresh
If Adodc1.Recordset.EOF Then
MsgBox "现在单位为空,请添加。。", 64, "提示信息"
Else
Set DataGrid1.DataSource = Adodc1
End If
End If
If Combo1.Text = Combo1.List(0) Then
Adodc1.RecordSource = "select*from 现金帐 where 银行户名 like '%" & Text1.Text & "%'"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
End If
If Combo1.Text = Combo1.List(1) Then
Adodc1.RecordSource = "select*from 现金帐 where 银行编号 like '%" & Text1.Text & "%'"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
End If
End Sub

Private Sub Command2_Click()
id1 = DataGrid1.Text
修改现金帐.Show 1
Adodc1.Refresh
End Sub

Private Sub Command4_Click()
Dim out As Integer
out = MsgBox("真的要退出吗?", 32 + vbYesNo, "退出")
If out = 6 Then
Unload Me
End If
End Sub

Private Sub Form_Load()
Dim i As Integer
Dim a(1) As String
a(0) = "按户名查询"
a(1) = "按编号查询"
For i = 0 To 1
Combo1.AddItem a(i)
Next i
End Sub

⌨️ 快捷键说明

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