Hi Folks -
Have gone seriously brain-dead on this. Situation: In a public sub, have dim'd DOW1, DOW2 etc. thru DOW7 as integers.
Were this a recordset and we had fields DOW1, DOW2, etc.. we could do something like:
n = 6 'as an example
strHold = "DOW" & format
rs(strHold) = rs(strHold) + 1
...this would increment rs!DOW6 by 1
Where I'm at a loss is how to perform the similar action but referring not to fields in a table but rather to a specific variable (DOW6). Realize that I could do this with case statements, or the Switch() or Choose() functions, but the code would be really ugly. Know I'm overlooking the obvious here.
If you can help put me out of misery, I'd really be grateful.
Thanks, Bob
Have gone seriously brain-dead on this. Situation: In a public sub, have dim'd DOW1, DOW2 etc. thru DOW7 as integers.
Were this a recordset and we had fields DOW1, DOW2, etc.. we could do something like:
n = 6 'as an example
strHold = "DOW" & format

rs(strHold) = rs(strHold) + 1
...this would increment rs!DOW6 by 1
Where I'm at a loss is how to perform the similar action but referring not to fields in a table but rather to a specific variable (DOW6). Realize that I could do this with case statements, or the Switch() or Choose() functions, but the code would be really ugly. Know I'm overlooking the obvious here.
If you can help put me out of misery, I'd really be grateful.
Thanks, Bob