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

📄 frm_lrwh.frm

📁 固定资产及设备管理系统
💻 FRM
📖 第 1 页 / 共 3 页
字号:
Text26.Text = ""
Combo1.Text = ""
Combo2.Text = ""
Combo3.Text = ""
Combo4.Text = ""
Combo5.Text = ""
Combo6.Text = ""
Combo7.Text = ""
frm_main.Adodc1.Refresh
Else
End If
End If
End If
adoCon.Close
End Sub

Private Sub Command3_Click()
frm_LRWH.Hide
End Sub

Private Sub DTPicker1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
DTPicker2.SetFocus
Else
End If
End Sub

Private Sub DTPicker2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
DTPicker3.SetFocus
Else
End If
End Sub

Private Sub DTPicker3_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Combo2.SetFocus
Else
End If
End Sub

Private Sub Form_Load()
If frm_zdysz.Text1.Text = "" Then
Label25.Caption = "自定义项1"
Else
Label25.Caption = frm_zdysz.Text1.Text
End If
If frm_zdysz.Text2.Text = "" Then
Label27.Caption = "自定义项2"
Else
Label27.Caption = frm_zdysz.Text2.Text
End If
If frm_zdysz.Text3.Text = "" Then
Label29.Caption = "自定义项3"
Else
Label29.Caption = frm_zdysz.Text3.Text
End If
If frm_zdysz.Text4.Text = "" Then
Label26.Caption = "自定义项4"
Else
Label26.Caption = frm_zdysz.Text4.Text
End If
If frm_zdysz.Text5.Text = "" Then
Label28.Caption = "自定义项5"
Else
Label28.Caption = frm_zdysz.Text5.Text
End If
If frm_zdysz.Text6.Text = "" Then
Label30.Caption = "自定义项6"
Else
Label30.Caption = frm_zdysz.Text6.Text
End If
If frm_zdysz.Text7.Text = "" Then
Label31.Caption = "自定义项7"
Else
Label31.Caption = frm_zdysz.Text7.Text
End If
If frm_zdysz.Text8.Text = "" Then
Label33.Caption = "自定义项8"
Else
Label33.Caption = frm_zdysz.Text8.Text
End If
If frm_zdysz.Text9.Text = "" Then
Label34.Caption = "自定义项9"
Else
Label34.Caption = frm_zdysz.Text9.Text
End If
If frm_zdysz.Text10.Text = "" Then
Label32.Caption = "自定义项10"
Else
Label32.Caption = frm_zdysz.Text10.Text
End If
If frm_zdysz.Text11.Text = "" Then
Label35.Caption = "自定义项11"
Else
Label35.Caption = frm_zdysz.Text11.Text
End If
If frm_zdysz.Text12.Text = "" Then
Label36.Caption = "自定义项12"
Else
Label36.Caption = frm_zdysz.Text12.Text
End If

End Sub

Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
 If KeyCode = 13 Then
     Adodc1.RecordSource = "select * from Table_ZCXX where 资产设备编号='" + Text1.Text + "'"
     Adodc1.Refresh
     If Adodc1.Recordset.RecordCount > 0 Then
        Text28.Text = Adodc1.Recordset.Fields("资产设备编号")
        Combo4.Text = Adodc1.Recordset.Fields("资产设备名称")
        Text3.Text = Adodc1.Recordset.Fields("型号")
        Text4.Text = Adodc1.Recordset.Fields("详细配置")
        Combo1.Text = Adodc1.Recordset.Fields("计量单位1")
        Text5.Text = Adodc1.Recordset.Fields("国际编号")
        Text6.Text = Adodc1.Recordset.Fields("生产厂家")
        DTPicker1.Value = Adodc1.Recordset.Fields("出厂日期")
        DTPicker2.Value = Adodc1.Recordset.Fields("购买日期")
        DTPicker3.Value = Adodc1.Recordset.Fields("入帐日期")
        Combo2.Text = Adodc1.Recordset.Fields("增加方式")
        Combo3.Text = Adodc1.Recordset.Fields("使用情况")
        Combo5.Text = Adodc1.Recordset.Fields("使用部门")
        Combo6.Text = Adodc1.Recordset.Fields("保管人员")
        Text2.Text = Adodc1.Recordset.Fields("存放地点")
        Text7.Text = Adodc1.Recordset.Fields("备注")
        Text8.Text = Adodc1.Recordset.Fields("数量")
        Text9.Text = Adodc1.Recordset.Fields("单价")
        Text11.Text = Adodc1.Recordset.Fields("金额")
        Text13.Text = Adodc1.Recordset.Fields("累计折旧")
        Combo7.Text = Adodc1.Recordset.Fields("折旧方法")
'        Text10.Text = Adodc1.Recordset.Fields("净值残率")
        Text12.Text = Adodc1.Recordset.Fields("预计使用年限")
        Text14.Text = Adodc1.Recordset.Fields("净值")
        Text15.Text = Adodc1.Recordset.Fields("自定义项1")
        Text16.Text = Adodc1.Recordset.Fields("自定义项2")
        Text23.Text = Adodc1.Recordset.Fields("自定义项3")
        Text17.Text = Adodc1.Recordset.Fields("自定义项4")
        Text20.Text = Adodc1.Recordset.Fields("自定义项5")
        Text24.Text = Adodc1.Recordset.Fields("自定义项6")
        Text18.Text = Adodc1.Recordset.Fields("自定义项7")
        Text21.Text = Adodc1.Recordset.Fields("自定义项8")
        Text25.Text = Adodc1.Recordset.Fields("自定义项9")
        Text19.Text = Adodc1.Recordset.Fields("自定义项10")
        Text22.Text = Adodc1.Recordset.Fields("自定义项11")
        Text26.Text = Adodc1.Recordset.Fields("自定义项12")
        Text29.Text = Adodc1.Recordset.Fields("借出数量")
        Text30.Text = Adodc1.Recordset.Fields("移动数量")
        Text31.Text = Adodc1.Recordset.Fields("折旧数量")

     End If
     Combo4.SetFocus
    Else
 End If
End Sub

Private Sub Text10_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text12.SetFocus
Else
End If
End Sub

Private Sub Text10_LostFocus()
If Text10.Text = "" Then
MsgBox "输入不能为空", , "提示"
Else
If Asc(Text10.Text) < 48 Or Asc(Text10.Text) > 57 Then
MsgBox "输入数据非法!!", , "提示"
Text10.Text = ""
Text10.SetFocus
Else
End If
End If

End Sub

Private Sub Text11_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text13.SetFocus
Else
End If
End Sub

Private Sub Text11_LostFocus()
If Text11.Text = "" Then
MsgBox "输入不能为空", , "提示"
Else
If Asc(Text11.Text) < 48 Or Asc(Text11.Text) > 57 Then
MsgBox "输入数据非法!!", , "提示"
Text11.Text = ""
Text11.SetFocus
Else
End If
End If

End Sub

Private Sub Text12_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text14.SetFocus
Else
End If
End Sub

Private Sub Text12_LostFocus()
If Text12.Text = "" Then
MsgBox "输入不能为空", , "提示"
Else
If Asc(Text12.Text) < 48 Or Asc(Text12.Text) > 57 Then
MsgBox "输入数据非法!!", , "提示"
Text12.Text = ""
Text12.SetFocus
Else
End If
End If
End Sub

Private Sub Text13_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Combo7.SetFocus
Else
End If
End Sub

Private Sub Text13_LostFocus()
If Text13.Text = "" Then
MsgBox "输入不能为空", , "提示"
Else
If Asc(Text13.Text) < 48 Or Asc(Text13.Text) > 57 Then
MsgBox "输入数据非法!!", , "提示"
Text13.Text = ""
Text13.SetFocus
Else
End If
End If

End Sub

Private Sub Text14_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text15.SetFocus
Else
End If
End Sub

Private Sub Text14_LostFocus()
If Text14.Text = "" Then
MsgBox "输入不能为空", , "提示"
Else
If Asc(Text14.Text) < 48 Or Asc(Text14.Text) > 57 Then
MsgBox "输入数据非法!!", , "提示"
Text14.Text = ""
Text14.SetFocus
Else
End If
End If
End Sub

Private Sub Text15_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text16.SetFocus
Else
End If
End Sub

Private Sub Text16_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text23.SetFocus
Else
End If
End Sub

Private Sub Text17_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text20.SetFocus
Else
End If
End Sub

Private Sub Text18_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text21.SetFocus
Else
End If
End Sub

Private Sub Text19_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text22.SetFocus
Else
End If
End Sub

Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text7.SetFocus
Else
End If
End Sub

Private Sub Text20_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text24.SetFocus
Else
End If
End Sub

Private Sub Text21_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text25.SetFocus
Else
End If
End Sub

Private Sub Text22_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text26.SetFocus
Else
End If
End Sub

Private Sub Text23_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text17.SetFocus
Else
End If
End Sub

Private Sub Text24_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text18.SetFocus
Else
End If
End Sub

Private Sub Text25_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text19.SetFocus
Else
End If
End Sub

Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer)
 If KeyCode = 13 Then
         Text4.SetFocus
   Else
 End If
End Sub

Private Sub Text4_Change()
If KeyCode = 13 Then
Combo1.SetFocus
Else
End If
End Sub

Private Sub Text4_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Combo1.SetFocus
Else
End If
End Sub

Private Sub Text5_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text6.SetFocus
Else
End If
End Sub

Private Sub Text6_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
DTPicker1.SetFocus
Else
End If
End Sub

Private Sub Text7_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text8.SetFocus
Else
End If
End Sub

Private Sub Text8_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text9.SetFocus
Else
End If
End Sub

Private Sub Text8_LostFocus()
If Text8.Text = "" Then
MsgBox "输入不能为空", , "提示"
Else
If Asc(Text8.Text) < 48 Or Asc(Text8.Text) > 57 Then
MsgBox "输入数据非法!!", , "提示"
Text8.Text = ""
Text8.SetFocus
Else
End If
End If
Text11.Text = Val(Text8.Text) * Val(Text9.Text)
End Sub

Private Sub Text9_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text11.SetFocus
Else
End If
End Sub

Private Sub Text9_LostFocus()
If Text9.Text = "" Then
MsgBox "输入不能为空", , "提示"
Else
If Asc(Text9.Text) < 48 Or Asc(Text9.Text) > 57 Then
MsgBox "输入数据非法!!", , "提示"
Text9.Text = ""
Text9.SetFocus
Else
End If
End If
Text11.Text = Val(Text8.Text) * Val(Text9.Text)
End Sub

⌨️ 快捷键说明

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