Private Sub Form_Current()
For Each ctl In Me.Controls
If ctl.ControlType = acTextBox Then
ctl.OnClick = "=ctl_Click('" & ctl & "')"
ctl.IsHyperlink = True
End If
Next
End Sub
Public Function Ctl_Click(CtlCaption As String)
Me.Parent!信息子窗体.Form.Filter = "房号='" & CtlCaption & "'"
Me.Parent!信息子窗体.Form.FilterOn = True
End Function