Is control visible on form

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?
 
A

Allen Browne

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top