How to loop columns in many tables but is same structure

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Liew
    New Member
    • Sep 2010
    • 1

    #1

    How to loop columns in many tables but is same structure

    Hi, I am doing a project that using microsoft access as database and link to VB.net. I have 3 tables named table1, table2 and table3 with same columns name but different value. For example, let say the table1 have device, week1, week2 and week3 as column, the another 2 tables's structure also same like table1. what i need to do is multiple the week1 value in table1 with week1 value in table2 and display it at table3's week1. the problem i am facing now is the VB.net cannot loop the week from week1 to week3. what i now can do is just select 1 week and calculate from that week... i need some code that can loop the column from week1 to week3 without select and can stop until the last column. this is because in the future maybe have more than 3 week need to calculate.
    Anyone got ideal how to do so? thanks!
Working...