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

📄 form11.frm

📁 小型企业进销存源代码 一款小型企业进销存源代码
💻 FRM
📖 第 1 页 / 共 2 页
字号:
Combo2.Text = "离异"
Text1.Visible = False
DTPicker1.Visible = False
DTPicker2.Visible = False
Label5.Visible = False
Label6.Visible = False
Combo2.Visible = True
ElseIf Combo1.Text = "部门" Then
Combo2.Clear
count = GetPrivateProfileInt("部门", "类型数", 0, App.Path + "\数据\部门.ini")
For i = 1 To count
Combo2.AddItem GetPrivateStringValue("部门", "b" & i, App.Path + "\数据\部门.ini")
Next i
Combo2.Text = GetPrivateStringValue("部门", "b1", App.Path + "\数据\部门.ini")
'加入部门选框
Text1.Visible = False
DTPicker1.Visible = False
DTPicker2.Visible = False
Label5.Visible = False
Label6.Visible = False
Combo2.Visible = True

ElseIf Combo1.Text = "班组" Then
Combo2.Clear
count = GetPrivateProfileInt("隶属二级部门", "类型数", 0, App.Path + "\数据\部门.ini")
For i = 1 To count
Combo2.AddItem GetPrivateStringValue("隶属二级部门", "b" & i, App.Path + "\数据\部门.ini")
Next i
Combo2.Text = GetPrivateStringValue("隶属二级部门", "b1", App.Path + "\数据\部门.ini")
Text1.Visible = False
Combo2.Visible = True
DTPicker1.Visible = False
DTPicker2.Visible = False
Label5.Visible = False
Label6.Visible = False

ElseIf Combo1.Text = "入厂时间" Then
DTPicker1.Visible = True
DTPicker2.Visible = True
Label5.Visible = True
Label6.Visible = True
Text1.Visible = False
Combo2.Visible = False
End If
End Sub



Private Sub Combo2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Command1_Click
End If
End Sub

Private Sub Command1_Click()
If Text1.Text = "" Then
MsgBox "请输入查询!", 48, "提示"
Exit Sub
Else
DBGrid1.Visible = True
End If
If Combo1.Text = "学历" Then
Data1.RecordSource = "select 职工编号,姓名,性别,入本单位工作时间,手机,毕业学校 from 基本档案1 where (文化程度 = '" & Combo2.Text & " ')order by 职工编号 aSc "
Data1.Refresh
ElseIf Combo1.Text = "性别" Then
Data1.RecordSource = "select 职工编号,姓名,性别,入本单位工作时间,手机 from 基本档案1 where (性别 = '" & Combo2.Text & " ')order by 职工编号 aSc "
Data1.Refresh
ElseIf Combo1.Text = "政治面貌" Then
Data1.RecordSource = "select 职工编号,姓名,性别,政治面貌,身份证号 from 基本档案1 where (政治面貌 = '" & Combo2.Text & " ')order by 职工编号 aSc "
Data1.Refresh
ElseIf Combo1.Text = "本厂工龄" Then
Data1.RecordSource = "select 职工编号,姓名,性别,入本单位工作时间,本厂工龄 from 基本档案1 where (本厂工龄 =  '" & Text1.Text & " ')order by 职工编号 aSc "
Data1.Refresh
ElseIf Combo1.Text = "籍贯" Then
Data1.RecordSource = "select 职工编号,姓名,性别,入本单位工作时间,籍贯 from 基本档案1 where (籍贯 = '" & Text1.Text & " ')order by 职工编号 aSc "
Data1.Refresh
ElseIf Combo1.Text = "婚姻状况" Then
Data1.RecordSource = "select 职工编号,姓名,性别,入本单位工作时间,籍贯,婚姻状况 from 基本档案1 where (婚姻状况 = '" & Combo2.Text & " ')order by 职工编号 aSc "
Data1.Refresh
ElseIf Combo1.Text = "部门" Then
Data1.RecordSource = "select 职工编号,姓名,性别,入本单位工作时间,籍贯,部门 from 基本档案1 where (部门 = '" & Combo2.Text & " ')order by 职工编号 aSc "
Data1.Refresh
ElseIf Combo1.Text = "班组" Then
Data1.RecordSource = "select 职工编号,姓名,性别,入本单位工作时间,籍贯,隶属二级部门 from 基本档案1 where (隶属二级部门 = '" & Combo2.Text & " ')order by 职工编号 aSc "
Data1.Refresh
ElseIf Combo1.Text = "出生年月" Then
Data1.RecordSource = "select 姓名,性别,部门,隶属二级部门,生日,本厂工龄 from 基本档案1 where (生日 between '" & DTPicker1.Value & "'and '" & DTPicker2.Value & " ') order by 职工编号 aSc"
Data1.Refresh
ElseIf Combo1.Text = "入厂时间" Then
Data1.RecordSource = "select 姓名,性别,部门,隶属二级部门,入本单位工作时间,本厂工龄 from 基本档案1 where (入本单位工作时间 between '" & DTPicker1.Value & "'and '" & DTPicker2.Value & " ') order by 职工编号 aSc"
Data1.Refresh
End If
Label3.Caption = Data1.Recordset.RecordCount
If Data1.Recordset.RecordCount = 0 Then
MsgBox "记录不存在!", 64, "提示"
End If
End Sub





Private Sub Command2_Click()
Unload Me
End Sub

Private Sub DTPicker1_CallbackKeyDown(ByVal KeyCode As Integer, ByVal Shift As Integer, ByVal CallbackField As String, CallbackDate As Date)
If KeyAscii = 13 Then
Command1_Click
End If
End Sub



Private Sub DTPicker2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Command1_Click
End If
End Sub

Private Sub Form_Load()
'Combo1.AddItem "姓名"
'Combo1.AddItem "工号"
Combo1.AddItem "学历"
Combo1.AddItem "性别"
Combo1.AddItem "政治面貌"
Combo1.AddItem "出生年月"
Combo1.AddItem "入厂时间"
Combo1.AddItem "本厂工龄"
Combo1.AddItem "籍贯"
Combo1.AddItem "婚姻状况"
Combo1.AddItem "部门"
Combo1.AddItem "班组"
Combo1.Text = "出生年月"
Data1.DatabaseName = "\\" & Frm_服务器设置.Text2.Text & "\data$\db1.mdb"
Data1.RecordSource = "select * from 基本档案1"
Data1.Refresh
DBGrid1.Visible = False
DTPicker1.Visible = False
DTPicker2.Visible = False
Label5.Visible = False
Label6.Visible = False
Text1.Visible = False
Combo2.Visible = False
Dim count As Integer
Dim Name As Long
Dim i As Integer, n As Integer
If Combo1.Text = "出生年月" Then
DTPicker1.Visible = True
DTPicker2.Visible = True
Label5.Visible = True
Label6.Visible = True
Text1.Visible = False
Combo2.Visible = False
ElseIf Combo1.Text = "学历" Then
Combo2.Clear
count = GetPrivateProfileInt("文化程度", "类型数", 0, App.Path + "\数据\部门.ini")
For i = 1 To count
Combo2.AddItem GetPrivateStringValue("文化程度", "b" & i, App.Path + "\数据\部门.ini")
Next i
Combo2.Text = GetPrivateStringValue("文化程度", "b1", App.Path + "\数据\部门.ini")
'加入文化程度选框
Text1.Visible = False
DTPicker1.Visible = False
DTPicker2.Visible = False
Label5.Visible = False
Label6.Visible = False
Combo2.Visible = True
ElseIf Combo1.Text = "性别" Then
Combo2.Clear
Combo2.AddItem "男"
Combo2.AddItem "女"
Combo2.Text = "女"
Text1.Visible = False
DTPicker1.Visible = False
DTPicker2.Visible = False
Label5.Visible = False
Label6.Visible = False
Combo2.Visible = True
ElseIf Combo1.Text = "政治面貌" Then
Combo2.Clear
count = GetPrivateProfileInt("政治面貌", "类型数", 0, App.Path + "\数据\部门.ini")
For i = 1 To count
Combo2.AddItem GetPrivateStringValue("政治面貌", "b" & i, App.Path + "\数据\部门.ini")
Next i
Combo2.Text = GetPrivateStringValue("政治面貌", "b1", App.Path + "\数据\部门.ini")
'加入政治面貌选框
Text1.Visible = False
DTPicker1.Visible = False
DTPicker2.Visible = False
Label5.Visible = False
Label6.Visible = False
Combo2.Visible = True
ElseIf Combo1.Text = "本厂工龄" Then
Text1.Text = "1"
Text1.Visible = True
Combo2.Visible = False
DTPicker1.Visible = False
DTPicker2.Visible = False
Label5.Visible = False
Label6.Visible = False
ElseIf Combo1.Text = "籍贯" Then
Text1.Text = "湖北"
Text1.Visible = True
DTPicker1.Visible = False
DTPicker2.Visible = False
Label5.Visible = False
Label6.Visible = False
Combo2.Visible = False
ElseIf Combo1.Text = "婚姻状况" Then
Combo2.Clear
Combo2.AddItem "未婚"
Combo2.AddItem "已婚"
Combo2.AddItem "再婚"
Combo2.AddItem "离异"
Combo2.Text = "离异"
Text1.Visible = False
DTPicker1.Visible = False
DTPicker2.Visible = False
Label5.Visible = False
Label6.Visible = False
Combo2.Visible = True
ElseIf Combo1.Text = "部门" Then
Combo2.Clear
count = GetPrivateProfileInt("部门", "类型数", 0, App.Path + "\数据\部门.ini")
For i = 1 To count
Combo2.AddItem GetPrivateStringValue("部门", "b" & i, App.Path + "\数据\部门.ini")
Next i
Combo2.Text = GetPrivateStringValue("部门", "b1", App.Path + "\数据\部门.ini")
'加入部门选框
Text1.Visible = False
DTPicker1.Visible = False
DTPicker2.Visible = False
Label5.Visible = False
Label6.Visible = False
Combo2.Visible = True

ElseIf Combo1.Text = "班组" Then
Combo2.Clear
count = GetPrivateProfileInt("隶属二级部门", "类型数", 0, App.Path + "\数据\部门.ini")
For i = 1 To count
Combo2.AddItem GetPrivateStringValue("隶属二级部门", "b" & i, App.Path + "\数据\部门.ini")
Next i
Combo2.Text = GetPrivateStringValue("隶属二级部门", "b1", App.Path + "\数据\部门.ini")
Text1.Visible = False
Combo2.Visible = True
DTPicker1.Visible = False
DTPicker2.Visible = False
Label5.Visible = False
Label6.Visible = False

ElseIf Combo1.Text = "入厂时间" Then
DTPicker1.Visible = True
DTPicker2.Visible = True
Label5.Visible = True
Label6.Visible = True
Text1.Visible = False
Combo2.Visible = False
End If
End Sub


Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Command1_Click
End If
End Sub

⌨️ 快捷键说明

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