Is control visible on form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there,

Scenario:
I have a form upon which a user selects a report from a list box. The list
box's after update event triggers subsequent code which makes specific
textboxes or combo boxes visible for the user to enter criteria.

Issue:
Create a button that allows users to 'clear criteria' for textboxes or combo
boxes that are visible

Question:
How? And what code do I need?
 
Presumably you have basic VBA skills if you are trying to write this code.

Loop through the Controls collection of the form:
For Each ctl In Me.Controls

Examine the ControlType.
If it is acTextBox or acComboBox, then examine its Visible property.
 
Back
Top