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

📄 form7.frm

📁 这是我自己编写的关于创建和修改自己定义的数据库
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   4440
      TabIndex        =   5
      Top             =   2760
      Width           =   615
   End
   Begin VB.Label Label5 
      Caption         =   "LED各点亮度均匀"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   840
      TabIndex        =   4
      Top             =   2640
      Width           =   855
   End
   Begin VB.Label Label4 
      Caption         =   "显示内容移动正常"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   4080
      TabIndex        =   3
      Top             =   1920
      Width           =   855
   End
   Begin VB.Label Label3 
      Caption         =   "LED点阵块平齐"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   840
      TabIndex        =   1
      Top             =   1920
      Width           =   975
   End
   Begin VB.Label Label1 
      Caption         =   "WFK-03 LED 显示屏测试记录表"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2520
      TabIndex        =   0
      Top             =   360
      Width           =   4335
   End
End
Attribute VB_Name = "Form7"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim o1, p1, q1, r1, s1, t1, u1 As Integer
Dim str As String

Private Sub Command1_Click()
'Text1.Text = ""
Text2.Text = ""

Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
End Sub

Private Sub Command2_Click()
'Dim db As Database
'Dim rec As Recordset
'Set db = OpenDatabase(App.Path + "\wfk-03.mdb")
'Set rec = db.OpenRecordset("LEDxianshiping")

'rec.AddNew
'
'rec.Fields("编号") = Text1
'rec!LED点阵块平齐 = Text2
'rec!显示内容移动正常 = Text3
'rec!LED各点亮度均匀 = Text4
'rec!备注 = Text5

'rec!测试人 = Text6
'rec!测试日期 = Text7
'rec!检验人 = Text8
'rec!检验日期 = Text9
'rec.Update
'Text1.Text = ""
'Text2.Text = ""
'Text3.Text = ""
'Text4.Text = ""
'Text5.Text = ""
'Text6.Text = ""
'Text7.Text = ""
'Text8.Text = ""
'Text9.Text = ""
If Text1.Text = "" Then
    s1 = MsgBox("请输入删除编号,不能为空", 0, "提示")
Else
    Dim db As Database
    Dim rec As Recordset
    Set db = OpenDatabase(App.Path + "\wfk-03.mdb")
    Set rec = db.OpenRecordset("select * from LEDxianshiping where 编号 ='" & Text1.Text & " ' ")
    If rec.RecordCount > 0 Then
       t1 = MsgBox("确定要删除该记录", 4, "提示")
        If t1 = 6 Then
            'Dim db1 As Database
            'Dim rec1 As Recordset
            'Set db1 = OpenDatabase(App.Path + "\wfk-03.mdb")
            'Set rec1 = db1.OpenRecordset("diantai")
            'db1.Execute ("delete * from jietiaoqiban where 序号 ='" & Text5.Text & " ' ")
            db.Execute ("delete * from LEDxianshiping where 编号 ='" & Text1.Text & " ' ")
            Text1.Text = ""
            Text2.Text = ""
            Text3.Text = ""
            Text4.Text = ""
            Text5.Text = ""
            Text6.Text = ""
            Text7.Text = ""
            Text8.Text = ""
            Text9.Text = ""
         
        Else
        End If
        
    Else
            'Text1.Text = ""
            Text2.Text = ""
            Text3.Text = ""
            Text4.Text = ""
            Text5.Text = ""
            Text6.Text = ""
            Text7.Text = ""
            Text8.Text = ""
            Text9.Text = ""
        u1 = MsgBox("编号不存在,请输入要删除的编号", 0, "提示")
    End If
    rec.Close
    Set rec = Nothing

End If
End Sub

Private Sub Command3_Click()
Dim db As Database
Dim rec As Recordset
Set db = OpenDatabase(App.Path + "\wfk-03.mdb")
 Set rec = db.OpenRecordset("select * from LEDxianshiping  where 编号= '" & Text1.Text & " ' ")
If Text1.Text = "" Then
    o1 = MsgBox("请输入查询编号", 0, "提示")
Else
    If rec.RecordCount > 0 Then
        Text2.Text = gfNullToString(rec.Fields("LED点阵块平齐"))
        Text3.Text = gfNullToString(rec.Fields("显示内容移动正常"))
        Text4.Text = gfNullToString(rec.Fields("LED各点亮度均匀"))
        Text5.Text = gfNullToString(rec.Fields("备注"))
        Text6.Text = gfNullToString(rec.Fields("测试人"))
        Text7.Text = gfNullToString(rec.Fields("测试日期"))
        Text8.Text = gfNullToString(rec.Fields("检验人"))
        Text9.Text = gfNullToString(rec.Fields("检验日期"))
    Else
        'Text1.Text = ""
        Text2.Text = ""
        Text3.Text = ""
        Text4.Text = ""
        Text5.Text = ""
        Text6.Text = ""
        Text7.Text = ""
        Text8.Text = ""
        Text9.Text = ""

        p1 = MsgBox("编号不存在,请重新输入", 0, "提示")
    End If
End If
rec.Close
Set rec = Nothing
  
End Sub

Private Sub Command4_Click()
Dim db As Database
Dim rec As Recordset
Set db = OpenDatabase(App.Path + "\wfk-03.mdb")
Set rec = db.OpenRecordset("select 编号 from  LEDxianshiping where 编号= '" & Text1.Text & " ' ")
If Text1.Text = "" Then
    q1 = MsgBox("请输入编号", 0, "提示")
Else
    If rec.RecordCount = 0 Then
        str = "insert into LEDxianshiping ("
        str = str & "编号,LED点阵块平齐,显示内容移动正常,LED各点亮度均匀,"
        str = str & "备注,测试人,测试日期,检验人,检验日期"
        str = str & ")"
        str = str & " values("
        str = str & "'" & Text1.Text & "',"
        str = str & "'" & Text2.Text & "',"
        str = str & "'" & Text3.Text & "',"
        str = str & "'" & Text4.Text & "',"
        str = str & "'" & Text5.Text & "',"
        str = str & "'" & Text6.Text & "',"
        str = str & "'" & Text7.Text & "',"
        str = str & "'" & Text8.Text & "',"
        str = str & "'" & Text9.Text & "'"
        str = str & ") "
        db.Execute (str)
    Else
        r1 = MsgBox("是否覆盖以前的记录", 4, "提示")
        If r1 = 6 Then
            Set rec = db.OpenRecordset("select * from  LEDxianshiping where 编号= '" & Text1.Text & " ' ")
           
            db.Execute "update LEDxianshiping set LED点阵块平齐 = '" & Text2.Text & " ' where 编号 = '" & rec.Fields("编号") & "'"
            db.Execute "update LEDxianshiping set 显示内容移动正常 = '" & Text3.Text & " ' where 编号 = '" & rec.Fields("编号") & "'"
            
            db.Execute "update LEDxianshiping set LED各点亮度均匀 = '" & Text4.Text & " ' where 编号 = '" & rec.Fields("编号") & "'"
            
            db.Execute "update LEDxianshiping set 备注 = '" & Text5.Text & " ' where 编号 = '" & rec.Fields("编号") & "'"
            db.Execute "update LEDxianshiping set 测试人 = '" & Text6.Text & " ' where 编号 = '" & rec.Fields("编号") & "'"
            db.Execute "update LEDxianshiping set 测试日期 = '" & Text7.Text & " ' where 编号 = '" & rec.Fields("编号") & "'"
            db.Execute "update LEDxianshiping set 检验人 = '" & Text8.Text & " ' where 编号 = '" & rec.Fields("编号") & "'"
            db.Execute "update LEDxianshiping set 检验日期 = '" & Text9.Text & " ' where 编号 = '" & rec.Fields("编号") & "'"
        Else
        End If
    End If
End If
rec.Close
Set rec = Nothing

'Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
End Sub

Private Sub Command5_Click()
'Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
End Sub

Private Sub Command6_Click()
Unload Me
Form1.Show
'Form1.Show
'Form7.Visible = False
'Text1.Text = ""
'Text2.Text = ""
'Text3.Text = ""
'Text4.Text = ""
'Text5.Text = ""
'Text6.Text = ""
'Text7.Text = ""
'Text8.Text = ""
'Text9.Text = ""
End Sub


Private Sub Form_Unload(Cancel As Integer)
Unload Me
Form1.Show
End Sub

⌨️ 快捷键说明

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