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

📄 form1.frm

📁 用与大型超市的管理与运行;具有提高效率节省费用的优点
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      Enabled         =   0   'False
      Height          =   495
      Left            =   240
      TabIndex        =   0
      Top             =   960
      Width           =   2055
   End
   Begin VB.Data Data2 
      Caption         =   "Data2"
      Connect         =   "Access"
      DatabaseName    =   "C:\Documents and Settings\Administrator\桌面\11050302超市管理系统(033069,033068, 033067)\源代码\supermarket1.mdb"
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   855
      Left            =   8040
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   "TicketRecord"
      Top             =   3960
      Visible         =   0   'False
      Width           =   3615
   End
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access"
      DatabaseName    =   "C:\Documents and Settings\Administrator\桌面\11050302超市管理系统(033069,033068, 033067)\源代码\supermarket1.mdb"
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   855
      Left            =   240
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   "good"
      Top             =   4080
      Width           =   4695
   End
   Begin VB.Label Label11 
      Caption         =   "交易数量"
      Height          =   375
      Left            =   0
      TabIndex        =   36
      Top             =   7920
      Width           =   855
   End
   Begin VB.Label Label10 
      Caption         =   "保质期"
      Height          =   375
      Left            =   5400
      TabIndex        =   33
      Top             =   360
      Width           =   735
   End
   Begin VB.Label Label9 
      Caption         =   "找   零"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   5520
      TabIndex        =   29
      Top             =   8400
      Width           =   1455
   End
   Begin VB.Label Label8 
      Caption         =   "应付总额"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   5520
      TabIndex        =   28
      Top             =   7680
      Width           =   1455
   End
   Begin VB.Label Label7 
      Caption         =   "付款总额"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   5520
      TabIndex        =   27
      Top             =   7080
      Width           =   1455
   End
   Begin VB.Label Label6 
      Caption         =   "产地"
      Height          =   255
      Left            =   9720
      TabIndex        =   24
      Top             =   360
      Width           =   1455
   End
   Begin VB.Label Label5 
      Caption         =   "规格"
      Height          =   495
      Left            =   5400
      TabIndex        =   23
      Top             =   960
      Width           =   735
   End
   Begin VB.Label Label4 
      Caption         =   "单价"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   21.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      Height          =   855
      Left            =   4800
      TabIndex        =   22
      Top             =   5160
      Width           =   1575
   End
   Begin VB.Label Label3 
      Caption         =   "商品名称"
      Height          =   375
      Left            =   2760
      TabIndex        =   21
      Top             =   360
      Width           =   1215
   End
   Begin VB.Label Label1 
      Caption         =   "商品编码"
      Height          =   375
      Left            =   360
      TabIndex        =   20
      Top             =   360
      Width           =   855
   End
   Begin VB.Menu aa 
      Caption         =   "系统管理"
      Begin VB.Menu bb 
         Caption         =   "退出系统"
      End
   End
   Begin VB.Menu dd 
      Caption         =   "查看"
      Begin VB.Menu ee 
         Caption         =   "销售记录"
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub bb_Click()
Unload Me
End Sub

Private Sub Command1_Click()
If Text18.Text = "" Then
 MsgBox "交易数量不能为空"
 Text18.SetFocus
 Else
 
 Text16.Text = Text4.Text * Text18.Text
 cc = cc + 1
  sum = 0 + sum + Text16.Text
    Text8.Text = sum
Call Command5_Click
Call Command5_Click
'Call Command5_Click
'Call Command5_Click
End If

   'Text7.Text = ""
End Sub



Private Sub Command2_Click()
Text18.Text = ""
End Sub

Private Sub Command3_Click()
If Text9.Text = "" Then
  MsgBox " 付款总额不能为空!"
  Text9.SetFocus
Else
  'Dim zm As Integer
 ' zm = Val("textzm")
  If Val(Text9.Text) < Val(Text8.Text) Then
    MsgBox "所交金额不足"
    Text9.SetFocus
  Else
   Text10.Text = Val(Text9.Text) - Val(Text8.Text)
    Form2.Show
   
  End If
End If
sum = 0
End Sub

Private Sub Command4_Click()
Text8.Text = ""
Text10.Text = ""
Text9.Text = ""
End Sub

Private Sub Command5_Click()
If Command5.Caption = "新增" Then
   Command5.Caption = "确认"
  Data1.Recordset.Edit
  Data2.Recordset.AddNew
Else
 Command5.Caption = "新增"
 Text11.Text = Text1.Text
' Text12.Text = Text2.Text
 Text13.Text = Text3.Text
 Text14.Text = Text4.Text
 Text15.Text = Text18.Text
 Text16.Text = Text4.Text * Text15.Text
 'Text7.Text = Text7.Text - Text18.Text
 Data2.Recordset.Update
 Data2.Recordset.MoveLast
  Text7.Text = Text7.Text - Text18.Text
 Data1.Recordset.Update
 Data1.Recordset.MoveLast
End If
'If Command5.Caption = "新增" Then
  ' Command5.Caption = "确认"
  ' Data1.Recordset.Edit
   
  ' Text7.Text = Text7.Text - Text18.Text
'Else
' Command5.Caption = "新增"
' Text7.Text = Text7.Text - Text18.Text
' Data1.Recordset.Update
 'Data1.Recordset.MoveLast
 'End If
End Sub

Private Sub Command6_Click()
Dim mzy As String
  mzy = InputBox$("请输入商品编码", "查找窗")
  Data1.RecordSource = "select * from good where 商品标号= '" & mzy & "'"
  Data1.Refresh
   ' Data.RecordSource = "select * from Goodsinfo where 商品编码='" & Trim(Text1.Text) & "'"
  'Data3.Refresh
 If Data1.Recordset.EOF Then
 MsgBox "无此商品!"
 Data1.RecordSource = "good"
 Data1.Refresh
End If
'If Data3.Recordset.EOF Then
 'MsgBox "无此库存!"
 'Data3.RecordSource = "Goodsinfo"
 'Data3.Refresh
'End If
End Sub

Private Sub ee_Click()
Form3.Show
End Sub

⌨️ 快捷键说明

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