?? 會員基本信息查詢與打印.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 + -