📄 会员基本信息查询与打印.frm
字号:
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column13
DataField = "爱人姓名"
Caption = "爱人姓名"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column14
DataField = "现住址"
Caption = "现住址"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column15
DataField = "备注"
Caption = "备注"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
ColumnWidth = 1094.74
EndProperty
BeginProperty Column01
ColumnWidth = 2085.166
EndProperty
BeginProperty Column02
ColumnWidth = 2085.166
EndProperty
BeginProperty Column03
ColumnWidth = 2085.166
EndProperty
BeginProperty Column04
ColumnWidth = 2085.166
EndProperty
BeginProperty Column05
ColumnWidth = 2085.166
EndProperty
BeginProperty Column06
ColumnWidth = 2085.166
EndProperty
BeginProperty Column07
ColumnWidth = 2085.166
EndProperty
BeginProperty Column08
ColumnWidth = 2085.166
EndProperty
BeginProperty Column09
ColumnWidth = 2085.166
EndProperty
BeginProperty Column10
ColumnWidth = 2085.166
EndProperty
BeginProperty Column11
ColumnWidth = 2085.166
EndProperty
BeginProperty Column12
ColumnWidth = 1094.74
EndProperty
BeginProperty Column13
ColumnWidth = 2085.166
EndProperty
BeginProperty Column14
ColumnWidth = 2085.166
EndProperty
BeginProperty Column15
ColumnWidth = 2085.166
EndProperty
EndProperty
End
Begin VB.CheckBox Check1
Caption = "姓 名"
Height = 375
Index = 1
Left = 3870
TabIndex = 8
Top = 6840
Width = 1215
End
Begin VB.CheckBox Check1
Caption = "性 别"
Height = 375
Index = 2
Left = 7035
TabIndex = 7
Top = 6840
Width = 1215
End
Begin VB.CheckBox Check1
Caption = "政治面貌"
Height = 375
Index = 3
Left = 10185
TabIndex = 6
Top = 6840
Width = 1215
End
Begin VB.CommandButton cmdInquire
Caption = "查 询"
Height = 375
Left = 1800
TabIndex = 1
Top = 7560
Width = 1215
End
Begin VB.CommandButton cmdReturn
Caption = "返 回"
Height = 375
Left = 4440
TabIndex = 0
Top = 7560
Width = 1215
End
Begin VB.CheckBox Check1
Caption = "序 号"
Height = 375
Index = 0
Left = 720
TabIndex = 9
Top = 6840
Width = 975
End
Begin VB.Frame Frame1
Caption = "查询条件"
Height = 735
Left = 240
TabIndex = 10
Top = 6600
Width = 12975
End
End
Attribute VB_Name = "会员基本信息查询与打印"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdCancel_Click()
Check1(0).Value = False
Check1(1).Value = False
Check1(2).Value = False
Check1(3).Value = False
txtID.Text = ""
txtName.Text = ""
txtPolitical.Text = ""
txtSex.Text = ""
End Sub
Private Sub cmdInquire_Click()
Dim cc(4) As Boolean
Dim Sc As String
Sc = "driver={Microsoft Access Driver (*.mdb)};dbq=" & App.Path & "\tradeunion.mdb"
Set cn = New ADODB.Connection
cn.Open Sc
Dim OneQuerySql As String
OneQuerySql = "select * from 会员基本信息表 where "
If Check1(0).Value Then
If Trim(txtID.Text) = "" Then
MsgBox "请输入你查找人的序号", vbOKOnly + vbExclamation, "注意"
txtID.SetFocus
Exit Sub
Else
If Not IsNumeric(Trim(txtID.Text)) Then
MsgBox "序号请输入数字!", vbOKOnly + vbExclamation, "注意"
Exit Sub
txtID.SetFocus
End If
cc(0) = True
OneQuerySql = OneQuerySql & "序号='" & Trim(txtID.Text) & "'"
End If
Else
txtID.Text = ""
End If
If Check1(1).Value Then
If Trim(txtName.Text) = "" Then
sMeg = "请输入您要查找人的姓名"
MsgBox sMeg, vbOKOnly + vbExclamation, "注意"
txtName.SetFocus
Exit Sub
Else
cc(1) = True
If cc(0) Then
OneQuerySql = OneQuerySql & "and 姓名='" & txtName.Text & "'"
Else
OneQuerySql = OneQuerySql & "姓名='" & txtName.Text & "'"
End If
End If
Else
txtName.Text = ""
End If
If Check1(2).Value Then
If Trim(txtSex.Text) = "" Then
sMeg = "请输入您要查找人的性别"
MsgBox sMeg, vbOKOnly + vbExclamation, "注意"
txtSex.SetFocus
Exit Sub
Else
cc(2) = True
If cc(0) Or cc(1) Then
OneQuerySql = OneQuerySql & "and 性别='" & txtSex.Text & "'"
Else
OneQuerySql = OneQuerySql & "性别='" & txtSex.Text & "'"
End If
End If
Else
txtSex.Text = ""
End If
If Check1(3).Value Then
If Trim(txtPolitical.Text) = "" Then
sMeg = "请输入您要查找人的政治面貌"
MsgBox sMeg, vbOKOnly + vbExclamation, "注意"
txtPolitical.SetFocus
Exit Sub
Else
cc(3) = True
If cc(0) Or cc(1) Or cc(2) Then
OneQuerySql = OneQuerySql & "and 政治面貌='" & txtPolitical.Text & "'"
Else
OneQuerySql = OneQuerySql & "政治面貌='" & txtPolitical.Text & "'"
End If
End If
Else
txtPolitical.Text = ""
End If
If Not (cc(0) Or cc(1) Or cc(2) Or cc(3)) Then
OneQuerySql = "select* from 会员基本信息表 "
End If
OneQuerySql = OneQuerySql & "order by 序号"
Dim AdoRsTradeMem As New ADODB.Recordset
If AdoRsTradeMem.State = adStateOpen Then
AdoRsTradeMem.Close
End If
AdoRsTradeMem.Open OneQuerySql, cn, adOpenKeyset, adLockOptimistic
Set Adodc1.Recordset = AdoRsTradeMem
If Adodc1.Recordset.EOF Then
MsgBox "查无此人,请确认查询条件", vbOKOnly + vbExclamation, "警告"
Exit Sub
Else
emsg = "共查询到会员信息" & Adodc1.Recordset.RecordCount & "条。"
MsgBox emsg, vbOKOnly + vbExclamation, "提示"
Call LogPlug("会员信息表", "查询:" & txtID & " " & txtName & " " & txtSex & " " & txtPolitical & " " & "会员的信息")
End If
Adodc1.Recordset.Close
End Sub
Private Sub cmdReturn_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim Sc As String
Sc = "driver={Microsoft Access Driver (*.mdb)};dbq=" & App.Path & "\tradeunion.mdb"
Set cn = New ADODB.Connection
cn.Open Sc
Dim OneQuerySql As String
OneQuerySql = "select * from 会员基本信息表 order by 序号"
Dim AdoRsTradeMem As New ADODB.Recordset
If AdoRsTradeMem.State = adStateOpen Then
AdoRsTradeMem.Close
End If
AdoRsTradeMem.Open OneQuerySql, cn, adOpenKeyset, adLockOptimistic
Set Adodc1.Recordset = AdoRsTradeMem
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "系统内不存在任何会员基本信息,请先添加会员信息", vbOKOnly + vbExclamation, "警告"
Unload Me
会员基本信息管理.Show
Else
emsg = "共查询到会员信息" & Adodc1.Recordset.RecordCount & "条。"
MsgBox emsg, vbOKOnly + vbExclamation, "提示"
End If
End Sub
Private Sub printCommand_Click()
会员基本信息表.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -