Hi,
I have an Access Form with a details section on it.
Is there a way to refer a control in the section and turn it to .visible = false if a criteria is met?. The fields are bound field. I've tried the below code in the following procedure but didn't solve
Form_Load, Form_OnCurrent
Dim ctl As Control
For Each ctl In Me.Details.Controls
If ctl.ControlType = acTextBox And ctl.Tag = "*" Then
If Not IsNull(txtDueDate) Or Len(txtDueDate) > 0 Then
cmdButton.Visible = True
Else
cmdButton.Visible = False
End If
End If
Next
Thank you
Jambai
I have an Access Form with a details section on it.
Is there a way to refer a control in the section and turn it to .visible = false if a criteria is met?. The fields are bound field. I've tried the below code in the following procedure but didn't solve
Form_Load, Form_OnCurrent
Dim ctl As Control
For Each ctl In Me.Details.Controls
If ctl.ControlType = acTextBox And ctl.Tag = "*" Then
If Not IsNull(txtDueDate) Or Len(txtDueDate) > 0 Then
cmdButton.Visible = True
Else
cmdButton.Visible = False
End If
End If
Next
Thank you
Jambai