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

📄 form4.frm

📁 办公室小车管理系统,能自动打印派车单,自动统计小车的出车里程耗油等.
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            Strikethrough   =   0   'False
         EndProperty
         Height          =   390
         ItemData        =   "Form4.frx":0000
         Left            =   4800
         List            =   "Form4.frx":0013
         TabIndex        =   7
         Top             =   840
         Width           =   1812
      End
      Begin VB.ComboBox Combo2 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   13.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   390
         Left            =   4800
         TabIndex        =   4
         Text            =   " "
         Top             =   360
         Width           =   1812
      End
      Begin VB.ComboBox Combo1 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   405
         Left            =   1660
         TabIndex        =   2
         Top             =   360
         Width           =   1455
      End
      Begin VB.Label Label6 
         BorderStyle     =   1  'Fixed Single
         Caption         =   "时     间"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   3240
         TabIndex        =   10
         Top             =   1320
         Width           =   1455
      End
      Begin VB.Label Label5 
         BorderStyle     =   1  'Fixed Single
         Caption         =   "领 用 量"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   13.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   372
         Left            =   240
         TabIndex        =   8
         Top             =   1320
         Width           =   1332
      End
      Begin VB.Label Label4 
         BorderStyle     =   1  'Fixed Single
         Caption         =   "油 品 名"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   13.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   3210
         TabIndex        =   6
         Top             =   840
         Width           =   1455
      End
      Begin VB.Label Label3 
         BorderStyle     =   1  'Fixed Single
         Caption         =   "车    号"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   13.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   372
         Left            =   240
         TabIndex        =   5
         Top             =   840
         Width           =   1332
      End
      Begin VB.Label Label2 
         BorderStyle     =   1  'Fixed Single
         Caption         =   "领 用 人"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   13.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   3210
         TabIndex        =   3
         Top             =   360
         Width           =   1455
      End
      Begin VB.Label Label1 
         BorderStyle     =   1  'Fixed Single
         Caption         =   "领用单位"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   13.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   372
         Left            =   240
         TabIndex        =   1
         Top             =   360
         Width           =   1332
      End
   End
End
Attribute VB_Name = "Form4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
On Error Resume Next
bch = Combo4.Text
bjsy = Combo2.Text
If bjsy = " " Then
MsgBox "领用人不得为空"
Combo2.SetFocus
Exit Sub
End If
sl = Val(Text2.Text)
 brcdw = Combo1.Text
 sj = Format(DTPicker1.Value, "yyyy-mm-dd")
 ybm = Combo3.Text
 Adodc3.Refresh
 Adodc3.Recordset.AddNew
 Adodc3.Recordset.Fields("jsr") = bjsy
 Adodc3.Recordset.Fields("ch") = bch
 Adodc3.Recordset.Fields("sl") = sl
 Adodc3.Recordset.Fields("bmmc") = brcdw
 Adodc3.Recordset.Fields("sj") = sj
 Adodc3.Recordset.Fields("wzm") = ybm
 Adodc3.Recordset.Update
Combo1.Text = ""
Combo2.Text = ""
Combo2.Text = ""
Combo4.Text = ""
'Text1.Text = ""
Text2.Text = ""
End Sub

Private Sub Command2_Click()
bch = Combo4.Text
bjsy = Combo2.Text
If bjsy = " " Then
MsgBox "领用人不得为空"
Combo2.SetFocus
Exit Sub
End If
sl = Val(Text2.Text)
 brcdw = Combo1.Text
 sj = Format(DTPicker1.Value, "yyyy-mm-dd")
 ybm = Combo3.Text
 Adodc3.Refresh
 Adodc3.Recordset.AddNew
 Adodc3.Recordset.Fields("jsr") = bjsy
 Adodc3.Recordset.Fields("ch") = bch
 Adodc3.Recordset.Fields("sl") = sl
 Adodc3.Recordset.Fields("bmmc") = brcdw
 Adodc3.Recordset.Fields("sj") = sj
 Adodc3.Recordset.Fields("wzm") = ybm
 Adodc3.Recordset.Update
 Combo4.Text = ""
 Combo1.Text = ""
Combo2.Text = ""
Combo3.Text = ""
Combo4.Text = ""

Call print2
' Form5.Show
End Sub

Private Sub Command3_Click()
Unload Me
End Sub

Private Sub Form_Load()
'On Error Resume Next
data1.DatabaseName = App.Path & "\bg.mdb"
data1.RecordSource = "cxk"
data1.Refresh
data1.Visible = False
Adodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\BG.MDB;Persist Security Info=False"
  Adodc2.Refresh
  Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\BG.MDB;Persist Security Info=False"
  Adodc1.Refresh
  Adodc3.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\BG.MDB;Persist Security Info=False"
  Adodc3.Refresh
Adodc1.Refresh
For i = 1 To Adodc1.Recordset.RecordCount
  Combo1.AddItem Adodc1.Recordset.Fields(0)
  Adodc1.Recordset.MoveNext
  Next i
  Adodc2.Refresh
For j = 1 To Adodc2.Recordset.RecordCount
  Combo2.AddItem Adodc2.Recordset.Fields(0)
  Adodc2.Recordset.MoveNext
  Next j
  For g = 1 To data1.Recordset.RecordCount
  Combo4.AddItem data1.Recordset.Fields(0)
  data1.Recordset.MoveNext
  Next g

DTPicker1.Value = Now
End Sub

Private Sub Form_Resize()
Frame1.Left = (Me.ScaleWidth - Frame1.Width) / 2
Frame1.Top = (Me.ScaleHeight - Frame1.Height) / 2 - 50
End Sub

Private Sub Text2_LostFocus()
On Error GoTo dd
Text2.Text = Text2.Text + 1
Text2.Text = Text2.Text - 1
Exit Sub
dd:
MsgBox "你输入了非法字符,请重输"
Text2.SetFocus
End Sub

⌨️ 快捷键说明

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