If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > JAVA > Looping through form controls

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-11-07, 00:19
tmccollum tmccollum is offline
Registered User
 
Join Date: Nov 2004
Posts: 32
Looping through form controls

I want to create a common function that will loop through the controls on a form. It needs to be able to work on all forms regardless of how many controls there are. I will then get the values and put them in an array.

cheers
Reply With Quote
  #2 (permalink)  
Old 04-11-07, 03:41
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
Someone on this forum gave me this code in VBA which does what you want. Customize as needed!
Code:
Dim ctl As Control

        For Each ctl In Me.Controls
                Debug.Print ctl.Name
        Next ctl
__________________
George
Twitter | Blog
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On