I'm having a problem with a loop I'm trying to run. I have a field on my form called mstrMembers. When a button is clicked, I want to copy the value in that field to 13 other fields. Those fields are names Mbrs0 through Mbrs12. So I'm running a loop and concatenation the String Mbrs & a (a is the loop variable to run from 0-12. I have a variable called result that puts the two strings together to make the field names of the places I want to copy. But then when I put result = mstrMembers instead of getting the field name Mbrs* which result is holding, it just sets the value of the variable 'result' to the value in mstrMembers. I want it to see what the value of result is and find that field on the form and put the value from mstrMembers in there. I can see why it's not working but I don't know how to fix it. I've attached the code. Thanks for the help.
Private Sub FillButton_Click()
Dim a As Integer
Dim result As String
Dim front As String
front = "Mbrs"
For a = 0 To 12
result = front & a
result = mstrMembers
Next a
End Sub
Private Sub FillButton_Click()
Dim a As Integer
Dim result As String
Dim front As String
front = "Mbrs"
For a = 0 To 12
result = front & a
result = mstrMembers
Next a
End Sub