Loop through controls

A

Andrew

Hi,

I have a form working how I want it to at the moment. There are potentially
20 controls able to be shown on the report but this number can be as low as
1. The user can press a button and from there a new form opens. Again this
I can do.

My problem is I want to loop through the potential controls (use the example
cnt_1, cnt_2 etc) and find if they're shown.

Could someone please help me with this basic code. It will be something like:

The 2 buttons I have are called cnt_Cat & cnt_Dog.

aArray = Array("Cat", "Dog")
iArray = 1
For I = 0 to iArray
msgbox Forms!" & aArray(The_Field_Counter) & ".Text *** This is my
problem area.
Next I
 

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