I have an array of information for each of the 50 states. On my window I have placed a TextField for each one. Depending on the information in the array, I may or may not want to populate the TextField for each state. I know I can easily loop through the array with a for…next loop, but is there any way to loop through those TextFields at the same time? Or is there a different way to define the TextFields so they are “loopable”?
Folks - got it going - thank you for the several suggestions!
The easiest was to simply make those controls part of a Control Array.
As to a good (or not) design - as I had mentioned, there are 50 US states. I need to see my specific data for all 50 at one time. This allows me to quickly see all those having data that need to be acted upon. Having to scroll through them in a ListBox would work, but not as quickly as seeing all 50 on one page.
Anyway, thanks again and I’d say this has answered my question. (and on my 77th birthday, no less!!)
I don’t quite understand what you mean here, though. If you have room to show 50 text fields, then you have the same space to show 50 rows on a listbox, without even needing to scroll (it even takes less space, since you have gaps between your text fields).
Tim - yes, to be accurate, it IS called a Control Set, not a control array. AI was kind enough to morph it into a new feature!
Arnaud. N - well, I probably should have been a tad more complete in my description of the application. Was trying not to be verbose. But, here goes… I am a ham radio operator (since 1964). One of the goals I and many other hams have is to contact at least one other ham operator in each of the 50 US states. Pretty easy-peasy. However, there are nine main ham radio “Bands” in the HF frequency range that we operate on, between 1.8 and 30 MHz. An even more challenging goal is to do that 50-states challenge on each of those nine bands.
Proof of those contacts can either be via a paper “QSL” card exchanged by each station or electronically via a US ham radio organization providing this service called ARRL - American Radio Relay League. What I need to see, for each of those 50 states, on each of the nine bands, is (1) have I made contact in that state on that band, (2) did I exchange a paper QSL card with one of those operators, and/or (3) was the verification done via electronic means. All that information is kept in a Sqlite database for every contact I have made since 1964 - I have over 14,000 of them so far.
Sooooo…… For each state, on each band, I want to see this data. Bottom line is that there are a lot more Control Set boxes than just 50. Bottom line number two is that I got it working perfectly with just a few simple lines of code. I had feared that I would have had to write a bazillion “if” statements to address each of those controls. The Control Set approach made my life a lot easier, and the process is extremely fast.