Sub Open檢索結果表單()
Dim frmopen As Boolean, x As String
If CurrentProject.AllForms("字典檢索輸入查詢_老師設計的").IsLoaded = False Then
DoCmd.OpenForm "字典檢索輸入查詢_老師設計的", , , , , acHidden ', , , , , acDialog
frmopen = True
Else
frmopen = False
End If
'Me.Visible = False '使獨佔式與跳現式的關閉(modal and popup)
With Form_字典檢索輸入查詢_老師設計的
.RecordSource = "SELECT 字.字ID, 字.字, 字.簡化字形, 字.簡化筆畫, 部首.部首" & _
", 字.總筆畫, 字.部首外筆畫, 字.字英譯, 字.釋文 AS 字解釋, 字.備註 ,字.筆順 " & _
"FROM 部首 RIGHT JOIN 字 ON 部首.部首ID = 字.部首ID WHERE (((" & Me.ActiveControl.Name & "." & _
Me.ActiveControl.Name & ")=""" & Me.ActiveControl & """)) ORDER BY 字.字;"
x = Me.ActiveControl
If Me.ActiveControl.Name = "部首" Then
x = 部首.Column(0)
Select Case AscW(x)
Case 25908
x = ChrW(25909)
End Select
End If
' .Recordset.FindFirst "字 = """ & x & """"
' If .CurrentView = 2 Then '資料工作表檢視
' DoCmd.RunCommand acCmdFormView
' End If
If .WindowHeight < 15400 Then DoCmd.SelectObject acForm, .Name: DoCmd.Maximize '15480
DoCmd.SelectObject acForm, .Name '"字典檢索輸入查詢_老師設計的"
' If Me.ActiveControl.Name = "字" Or 部首 = 字 Then
' If InStr(Me.RecordSource, "詞.") Then '如果是查詞彙來的
' 檢索詞彙標亮Term = Mid(聲符, InStr(聲符, "【") + 1, InStr(聲符, "】") - InStr(聲符, "【") - 1)
' 格式化標記.檢索詞彙標亮 字ID
' End If
' End If
End With
'DoCmd.Close acForm, Me.Name, acSaveNo
End Sub