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

📄 addform.frm

📁 上学时写的一个进销存管理软件
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      Left            =   1560
      TabIndex        =   5
      Top             =   1080
      Width           =   2655
   End
   Begin VB.Label Label12 
      Caption         =   "货物名:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   360
      TabIndex        =   0
      Top             =   120
      Width           =   855
   End
   Begin VB.Label Label11 
      Caption         =   "操作员:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   360
      TabIndex        =   20
      Top             =   4440
      Width           =   855
   End
   Begin VB.Label Label1 
      Caption         =   "进货时间:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   3000
      TabIndex        =   18
      Top             =   3960
      Width           =   1095
   End
   Begin VB.Label Label10 
      Caption         =   "进货日期:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   120
      TabIndex        =   16
      Top             =   3960
      Width           =   1215
   End
   Begin VB.Label Label9 
      Caption         =   "结算:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   600
      TabIndex        =   10
      Top             =   2520
      Width           =   615
   End
   Begin VB.Label Label8 
      Caption         =   "单价:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   600
      TabIndex        =   2
      Top             =   600
      Width           =   615
   End
   Begin VB.Label Label7 
      Caption         =   "备注:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   4560
      TabIndex        =   22
      Top             =   120
      Width           =   615
   End
   Begin VB.Label Label6 
      Caption         =   "货源单位:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   120
      TabIndex        =   14
      Top             =   3480
      Width           =   1215
   End
   Begin VB.Label Label5 
      Caption         =   "负责人:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   360
      TabIndex        =   12
      Top             =   3000
      Width           =   975
   End
   Begin VB.Label Label4 
      Caption         =   "实付款:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   360
      TabIndex        =   8
      Top             =   2040
      Width           =   855
   End
   Begin VB.Label Label3 
      Caption         =   "应付款:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   360
      TabIndex        =   6
      Top             =   1560
      Width           =   855
   End
   Begin VB.Label Label2 
      Caption         =   "数量:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   600
      TabIndex        =   4
      Top             =   1080
      Width           =   735
   End
End
Attribute VB_Name = "AddForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub ComboFuZeRen_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Me.ComboHuoYuanDanWei.SetFocus
Me.ComboFuZeRen.AddItem (Me.ComboFuZeRen.Text)
End If
End Sub

Private Sub ComboHuoYuanDanWei_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Me.TextBeiZhu.SetFocus
Me.TextBeiZhu.Text = ""
Me.ComboHuoYuanDanWei.AddItem (Me.ComboHuoYuanDanWei.Text)
End If
End Sub

Private Sub Command1_Click()
'判断记录是否符合要求
If AddForm.DBComboHuowuming.Text = "" Then
MsgBox "货物名不能为空"
Else
    If AddForm.TextDanjia.Text = "" Then
    MsgBox "没有单价"
    Else
        If AddForm.TextShuliang.Text = "" Then
        MsgBox "货物数量不能为空"
        Else
            If AddForm.ComboFuZeRen.Text = "" Then
            MsgBox "负责人不能为空"
            Else
                If AddForm.ComboHuoYuanDanWei.Text = "" Then
                MsgBox "货源单位不能为空"
                Else
                Module2.AddDataNumtb
                Module2.AddDataIntb
                End If
            End If
        End If
    End If
End If

End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Text2_Change()

End Sub

Private Sub DBComboHuoWuMing_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Me.TextDanjia.SetFocus
End If
End Sub

Private Sub Form_Load()
Module2.InitAddform
End Sub

Private Sub Textdianjia_Change()
Me.TextYingFuKuan.Text = Val(Textdianjia) * Val(TextShuliang)
End Sub

Private Sub TextDanjia_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Me.TextShuliang.SetFocus
End If
End Sub

Private Sub Textshifukuan_Change()
AddForm.TextJiesuan.Text = Val(AddForm.TextShiFuKuan) - Val(AddForm.TextYingFuKuan)
End Sub

Private Sub TextShiFuKuan_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
AddForm.ComboFuZeRen.SetFocus
End If
End Sub

Private Sub TextShuliang_Change()
AddForm.TextYingFuKuan.Text = Val(AddForm.TextDanjia) * Val(AddForm.TextShuliang)
End Sub

Private Sub Textyifukuan_Change()
AddForm.TextJiesuan.Text = Val(AddForm.TextShiFuKuan) - Val(AddForm.TextYingFuKuan)
End Sub

Private Sub TextShuliang_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
AddForm.TextShiFuKuan.SetFocus
End If
End Sub

Private Sub Timer1_Timer()
AddForm.TextDate.Text = Date
AddForm.TextTime.Text = Time()
End Sub

⌨️ 快捷键说明

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