I know I could use tags and controls collection to achieve this, but I'm also curious as to whether anyone has used dynamic control names in a loop.
I want to update several fieldnames with the only difference in their control names being a number on the end eg. "DateFx" where x is a number 1 through 13
This code didnt work but maybe Im close and someone can point me in the right direction...
as always, thanks
I want to update several fieldnames with the only difference in their control names being a number on the end eg. "DateFx" where x is a number 1 through 13
Code:
Dim vLoop, vFieldName, calcDate
For vLoop = 1 To 13
vFieldName = ("DateF" & vLoop)
calcDate = Me.someFieldName + someExpression
Me![vFieldName] = calcDate
Next
This code didnt work but maybe Im close and someone can point me in the right direction...
as always, thanks