Referencing one of three identical controls

The client has a very complex, unbound labour entry form.   One requirement is to efficiently add over time and double time hours for the same person, job, activity code, etc.  So the solution was to create three sets of controls that are identical except for the last character of the control name.   In this case Quantity1, Quantity2 and Quantity3.  Etc, etc.

zblog_multiplecontrols

But how do I efficiently reference those controls?  

For EntryLine = 1 To 3
    If Not IsNull(Me.Controls("Quantity" & EntryLine)) Then
         .....
    End If
Next EntryLine

Published Tue, Sep 16 2008 15:44 by Tony
Filed under: , ,

Leave a Comment

(required) 
(required) 
(optional)
(required) 
If you can't read this number refresh your screen
Enter the numbers above: