Office中国论坛/Access中国论坛
标题:
求助 查询问题,无限感谢
[打印本页]
作者:
文棣
时间:
2009-4-1 17:34
标题:
求助 查询问题,无限感谢
求助 查询问题,无限感谢
作者:
Henry D. Sy
时间:
2009-4-1 20:27
Private Sub 文本0_AfterUpdate()
Dim ctl As Control
If IsNull(Me.文本0) Then Exit Sub
For Each ctl In Me.xx_子窗体.Form.Controls
If TypeOf ctl Is TextBox Then
If Right(ctl.Name, 1) = "班" Then
If ctl.Name = Me.文本0 Then
Me.xx_子窗体.Controls(ctl.Name).ColumnHidden = False
Else
Me.xx_子窗体.Controls(ctl.Name).ColumnHidden = True
End If
End If
End If
Next
End Sub
复制代码
作者:
Henry D. Sy
时间:
2009-4-1 20:37
修正一下,清空文本0时复原
Private Sub 文本0_AfterUpdate()
Dim ctl As Control
For Each ctl In Me.xx_子窗体.Form.Controls
If TypeOf ctl Is TextBox Then
If Right(ctl.Name, 1) = "班" Then
If IsNull(Me.文本0) Then
Me.xx_子窗体.Controls(ctl.Name).ColumnHidden = False
Else
If ctl.Name = Me.文本0 Then
Me.xx_子窗体.Controls(ctl.Name).ColumnHidden = False
Else
Me.xx_子窗体.Controls(ctl.Name).ColumnHidden = True
End If
End If
End If
End If
Next
End Sub
复制代码
作者:
文棣
时间:
2009-4-2 16:19
无限感谢版主 谢谢
欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/)
Powered by Discuz! X3.3