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

📄 xiaoshouguanli.frm

📁 自己做的一个商品销售信息管理的程序。 VB新手
💻 FRM
📖 第 1 页 / 共 3 页
字号:
            _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 Label6 
            Caption         =   "回款单号"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   720
            TabIndex        =   25
            Top             =   360
            Width           =   855
         End
         Begin VB.Label Label7 
            Caption         =   "收款日期"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   720
            TabIndex        =   24
            Top             =   2160
            Width           =   855
         End
         Begin VB.Label Label8 
            Caption         =   "总金额"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   720
            TabIndex        =   23
            Top             =   1560
            Width           =   855
         End
         Begin VB.Label Label9 
            Caption         =   "入库单号"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   720
            TabIndex        =   22
            Top             =   960
            Width           =   855
         End
         Begin VB.Label Label10 
            Caption         =   "备注"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   720
            TabIndex        =   21
            Top             =   2760
            Width           =   855
         End
      End
   End
End
Attribute VB_Name = "zhangwuguanli"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()

End Sub

Private Sub cmdadd_Click()
If cmdadd.Caption = "添加" Then
currentbookmark = Adodc1.Recordset.AbsolutePosition
Adodc1.Recordset.AddNew

Text1.Locked = False
Text2.Locked = False
Text3.Locked = False
Text4.Locked = False
Text6.Locked = False

cmdadd.Caption = "保存"
cmdadd.Caption = "保存"
cmdModify.Enabled = False
cmddelete.Enabled = False
Else
   Adodc1.Recordset.Update
   cmdadd.Caption = "添加"
   cmdModify.Enabled = True
   cmddelete.Enabled = True
   'CanInput False
   currentbookmark = 0
End If
End Sub

Private Sub cmdadd1_Click()
If cmdadd1.Caption = "添加" Then
currentbookmark = Adodc2.Recordset.AbsolutePosition
Adodc2.Recordset.AddNew
cmdadd1.Caption = "保存"
cmdadd1.Caption = "保存"
cmdModify1.Enabled = False
'cmddelete1.Enabled = False

'Text6.Locked = False
''Text7.Locked = False
'Text8.Locked = False
'Text9.Locked = False
'Text10.Locked = False

Else
   Adodc2.Recordset.Update
   cmdadd1.Caption = "添加"
   cmdModify1.Enabled = True
   'cmddelete1.Enabled = True
   'CanInput False
   currentbookmark = 0
End If
End Sub

Private Sub cmdcancel_Click()
Unload Me
zhangwuguanli.Show
End Sub

Private Sub cmdcancel1_Click()
Unload Me
zhangwuguanli.Show
End Sub

Private Sub cmddelete_Click()
If RecordsetIsEmpty(Adodc1.Recordset) Then Exit Sub
If MsgBox("真的要删除这记录吗?", vbYesNo) = vbYes Then
  Adodc1.Recordset.Delete
 If RecordsetIsEmpty(Adodc1.Recordset) Then
 Adodc1.Refresh
  Exit Sub
End If
If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast
End If
End Sub

Private Sub cmdModify_Click()
If Adodc1.Recordset.AbsolutePosition < 0 Then Exit Sub
If cmdModify.Caption = "修改" Then
urrentbookmark = Adodc1.Recordset.AbsolutePosition
'CanInput True
cmdModify.Caption = "保存"
cmdModify.Enabled = True '更改
cmddelete.Enabled = False
cmdadd.Enabled = False

Text1.Locked = False
Text2.Locked = False
Text3.Locked = False
Text4.Locked = False
Text6.Locked = False

Else
  Adodc1.Recordset.Update
  cmdModify.Caption = "修改"
cmdadd.Enabled = True
cmddelete.Enabled = ture
  '  CanInput False
currentbookmark = 0

End If

End Sub

Private Sub Command2_Click()

End Sub

Private Sub cmdModify1_Click()
If Adodc2.Recordset.AbsolutePosition < 0 Then Exit Sub
If cmdModify1.Caption = "修改" Then
currentbookmark = Adodc2.Recordset.AbsolutePosition
'CanInput True
cmdModify1.Caption = "保存"
cmdModify1.Enabled = True
'cmddelete1.Enabled = False
cmdadd1.Enabled = False

'Text6.Locked = False
'Text7.Locked = False
'Text8.Locked = False
'Text9.Locked = False
'Text10.Locked = False

Else
  Adodc2.Recordset.Update
  cmdModify1.Caption = "修改"
cmdadd1.Enabled = True
'cmddelete1.Enabled = ture
  '  CanInput False
currentbookmark = 0

End If
End Sub

Private Sub Command7_Click()
If RecordsetIsEmpty(Adodc2.Recordset) Then Exit Sub
If MsgBox("真的要删除这记录吗?", vbYesNo) = vbYes Then
  Adodc2.Recordset.Delete
 If RecordsetIsEmpty(Adodc2.Recordset) Then
 Adodc2.Refresh
  Exit Sub
End If
If Adodc2.Recordset.EOF Then Adodc2.Recordset.MoveLast
End If

End Sub

Private Sub Form_Load()
Adodc1.CommandType = adCmdTable
Adodc1.RecordSource = "fukuandan"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1.Recordset


Adodc2.CommandType = adCmdTable
Adodc2.RecordSource = "huikuandan"
Adodc2.Refresh
Set DataGrid2.DataSource = Adodc2.Recordset

End Sub

⌨️ 快捷键说明

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