ms access - VB6 variable recordset name -


is possibile access recordset using variable name ?

for example, i've table 10 fields called name01,name02,name03.....name10. need cycle through them nice use 1 instruction insted of repeating same 1 10 different name.

this code i'm using now

sal01 = rsutility!order01  sal02 = rsutility!order02  ....   sal10 = rsutility!order10 

this accomplish :

for = 1 10      variablename = "order" &      sal(i) = rsutility!variablename  next 

since variables have 2 digit ending, gotta use proper format , not "order" & i, because result in order1 , not order01

for = 1 10      sal(i) = rsutility("order" & format(i,"00") ) next 

the loop above assign value corresponding array element db variables in range order01 order10 inclusive


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -