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

📄 frmsellst.frm

📁 数据库在VB界面上的实现.如何实现数据库登陆界面、以何种形式登陆、销售系统界面等
💻 FRM
📖 第 1 页 / 共 3 页
字号:
         Bindings        =   "frmsellst.frx":00D9
         Height          =   2175
         Left            =   -74880
         TabIndex        =   9
         Top             =   3600
         Width           =   6975
         _ExtentX        =   12303
         _ExtentY        =   3836
         _Version        =   393216
         AllowUpdate     =   0   'False
         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 MSDataGridLib.DataGrid DataGrid7 
         Bindings        =   "frmsellst.frx":00EE
         Height          =   1935
         Left            =   120
         TabIndex        =   12
         Top             =   840
         Width           =   6615
         _ExtentX        =   11668
         _ExtentY        =   3413
         _Version        =   393216
         AllowUpdate     =   0   'False
         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 MSDataGridLib.DataGrid DataGrid8 
         Bindings        =   "frmsellst.frx":0103
         Height          =   2175
         Left            =   120
         TabIndex        =   13
         Top             =   3360
         Width           =   6615
         _ExtentX        =   11668
         _ExtentY        =   3836
         _Version        =   393216
         AllowUpdate     =   0   'False
         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 Label4 
         Caption         =   "总金额"
         Height          =   375
         Left            =   1680
         TabIndex        =   14
         Top             =   5880
         Width           =   1215
      End
      Begin VB.Label Label3 
         Caption         =   "总金额"
         Height          =   375
         Left            =   -73440
         TabIndex        =   10
         Top             =   6240
         Width           =   1215
      End
      Begin VB.Label Label2 
         Caption         =   "总金额"
         Height          =   375
         Left            =   -73560
         TabIndex        =   6
         Top             =   5760
         Width           =   1215
      End
      Begin VB.Label Label1 
         Caption         =   "总金额"
         Height          =   375
         Left            =   -73680
         TabIndex        =   3
         Top             =   5880
         Width           =   1215
      End
   End
End
Attribute VB_Name = "frmsellst"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub form_activate()
Call MakeCenter(Me)
Dim inty As Integer
Dim intm As Integer
Dim intd As Integer
inty = Year(Date)
intm = Month(Date)
intd = Day(Date)
Dim sqlsell As String
Dim sqlfctotal As String
Dim sqltotal As String
Dim rs_check As New ADODB.Recordset
Dim rs_fctotal As New ADODB.Recordset
Dim rs_total As New ADODB.Recordset
rs_check.CursorLocation = adUseClient
rs_fctotal.CursorLocation = adUseClient
rs_total.CursorLocation = adUseClient
Adodc1.ConnectionString = connStr
Adodc2.ConnectionString = connStr
Adodc3.ConnectionString = connStr
Adodc4.ConnectionString = connStr
Adodc5.ConnectionString = connStr
Adodc6.ConnectionString = connStr
Adodc7.ConnectionString = connStr
Adodc8.ConnectionString = connStr
Select Case sstabbuy.Tab
Case 0
    sstabsell.TabEnabled(0) = True
    sstabsell.TabEnabled(1) = False
    sstabsell.TabEnabled(2) = False
    sstabsell.TabEnabled(3) = False
  
    sqlbuy = "select * from goods where 销售年=" & inty _
    & "and 销售月=" & intm & "and 销售日=" & intd & "order by" _
    & " 生产厂商,总金额 desc"
    rs_check.Open sqlbuy, conn, adOpenKeyset, adLockPessimistic
    Adodc1.RecordSource = sqlsell
    Adodc1.Refresh
    DataGrid1.ReBind
    If rs_check.EOF = True Then
        Adodc2.RecordSource = sqlsell
        Adodc2.Refresh
        DataGrid2.ReBind
        Text1.Text = 0
        MsgBox "您今日没有销售!", vbOKOnly + vbInformation, "注意"
        rs_check.Close
        Exit Sub
    End If
    rs_check.Close
    sqlfctotal = "select 生产厂商,sum(总金额) as 各厂商进货总金额 " _
    & "from goods where 销售年=" & inty & "and 销售月=" & intm _
    & "and 销售日=" & intd & "group by 生产厂商"
    rs_fctotal.Open sqlfctotal, conn, adOpenKeyset, adLockPessimistic
    Adodc2.RecordSource = sqlfctotal
    Adodc2.Refresh
    DataGrid2.ReBind
    rs_fctotal.Close
    sqltotal = "select sum(总金额) as 销售总金额 from goods where" _
    & "销售年=" & inty & "and 销售月=" & intm & "and 销售日=" & intd
    rs_total.Open sqlfctotal, conn, adOpenKeyset, adLockPessimistic
    Text1.Text = rs_total.Fields(0)
    rs_total.Close
  
 
Case 1
    sstabsell.TabEnabled(0) = False
    sstabsell.TabEnabled(1) = True
    sstabsell.TabEnabled(2) = False
    sstabsell.TabEnabled(3) = False
  
    sqlbuy = "select * from goods where 销售年=" & inty _
    & "and 销售月=" & intm & "order by 生产厂商,总金额 desc"
        rs_check.Open sqlbuy, conn, adOpenKeyset, adLockPessimistic
        Adodc3.RecordSource = sqlsell
        Adodc3.Refresh
        DataGrid3.ReBind
    If rs_check.EOF = True Then
        Adodc4.RecordSource = sqlsell
        Adodc4.Refresh
        DataGrid4.ReBind
        Text2.Text = 0
        MsgBox "您本月没有销售!", vbOKOnly + vbInformation, "注意"
        rs_check.Close
        Exit Sub
    End If
    rs_check.Close
    sqlfctotal = "select 生产厂商,sum(总金额) as 各厂商进货总金额" _
    & "from sell where 销售年=" & inty & "and 销售月=" & intm _
    & "group by 生产厂商"
    rs_fctotal.Open sqlfctotal, conn, adOpenKeyset, adLockPessimistic
    Adodc4.RecordSource = sqlfctotal
    Adodc4.Refresh
    DataGrid4.ReBind
    rs_fctotal.Close
    sqltotal = "select sum(总金额) as 销售总金额 from goods where" _
    & "销售年=" & inty & "and 销售月=" & intm
    rs_total.Open sqlfctotal, conn, adOpenKeyset, adLockPessimistic
    Text2.Text = rs_total.Fields(0)
    rs_total.Close
Case 2
    sstabsell.TabEnabled(0) = False
    sstabsell.TabEnabled(1) = False
    sstabsell.TabEnabled(2) = True
    sstabsell.TabEnabled(3) = False
    Dim a As Integer
    s = intm Mod 3
    If s = 0 Then s = 3
    sqlsell = "select * from sell where 销售年=" & inty _
    & "and 销售月 between" & (intm - s) & "and" & (intm + 1) _
    & "order by 生产厂商,总金额 desc"
        rs_check.Open sqlbuy, conn, adOpenKeyset, adLockPessimistic
        Adodc5.RecordSource = sqlsell
        Adodc5.Refresh
        DataGrid5.ReBind
    If rs_check.EOF = True Then
        Adodc6.RecordSource = sqlsell
        Adodc6.Refresh
        DataGrid6.ReBind
        Text3.Text = 0
        MsgBox "您本季度没有销售!", vbOKOnly + vbInformation, "注意"
        rs_check.Close
        Exit Sub
    End If
    rs_check.Close
    sqlfctotal = "select 生产厂商,sum(总金额) as 各厂商销售总金额" _
    & "from goods where 销售年=" & inty & "and 销售月 between" _
    & (intm - s) & "and" & intm & "group by 生产厂商"
    rs_fctotal.Open sqlfctotal, conn, adOpenKeyset, adLockPessimistic
    Adodc6.RecordSource = sqlfctotal
    Adodc6.Refresh
    DataGrid6.ReBind
    rs_fctotal.Close
    sqltotal = "select sum(总金额) as 销售总金额 from sell where" _
    & " 销售年=" & inty & "and 销售月 between" & (intm - s) & "and" & intm
    rs_total.Open sqlfctotal, conn, adOpenKeyset, adLockPessimistic
    Text3.Text = rs_total.Fields(0)
    rs_total.Close
    
Case 3
    sstabsell.TabEnabled(0) = False
    sstabsell.TabEnabled(1) = False
    sstabsell.TabEnabled(2) = False
    sstabsell.TabEnabled(3) = True
  
    sqlsell = "select * from goods where 销售年=" & inty _
    & "order by 生产厂商,总金额 desc"
    rs_check.Open sqlsell, conn, adOpenKeyset, adLockPessimistic
    Adodc7.RecordSource = sqlsell
    Adodc7.Refresh
    DataGrid7.ReBind
    If rs_check.EOF = True Then
    Adodc8.RecordSource = sqlsell
    Adodc8.Refresh
    DataGrid8.ReBind
    Text4.Text = 0
    MsgBox "您本年没有销售!", vbOKOnly + vbInformation, "注意"
    rs_check.Close
    Exit Sub
    End If
    rs_check.Close
    sqlfctotal = "select 生产厂商,sum(总金额) as 各厂商销售总金额" _
    & "from goods where 销售年=" & inty & "group by 生产厂商"
    rs_fctotal.Open sqlfctotal, conn, adOpenKeyset, adLockPessimistic
    Adodc8.RecordSource = sqlfctotal
    Adodc8.Refresh
    DataGrid8.ReBind
    rs_fctotal.Close
    sqltotal = "select sum(总金额) as 销售总金额 from goods where" _
    & "销售年=" & inty
    rs_total.Open sqlfctotal, conn, adOpenKeyset, adLockPessimistic
    Text4.Text = rs_total.Fields(0)
    rs_total.Close
End Select
End Sub

⌨️ 快捷键说明

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