use loop to reference ME control

clive2002

Registered User.
Local time
Today, 20:23
Joined
Apr 21, 2002
Messages
91
I'm trying to abbreviate the code below.

MovementType(1) = Me.Type1
MovementType(2) = Me.Type2
MovementType(3) = Me.Type3
MovementType(4) = Me.Type4

into somthing like this, but i can't get it to work??

For I = 1 To 4
MovementType(I) = Me.TypeI
Next I

How should i reference the control ME.Type1,Me.Type2,and so on using 'I' to finish the name of the control.

or is this not possible?
 
For I = 1 To 4
MovementType(I) = Me("Type"& I )
Next I
 

Users who are viewing this thread

Back
Top Bottom