M
mac_see
I have a database with two tables (Table1 and Table2). Table1 has 21 fields
(Field1,Field2.....Field21). Table2 has 2 fields (Field1 and Field2)
Field1 to Field10 of Table1 has random numbers from 1-100. Field11 to
Field21 of Table1 has all BLANK records.
Field1 of Table2 has 100 records (These fields contains numbers from 1-100
in ascending order). Field2 of Table2 has 100 records (All random numbers
from 1 to 15)
I am looking for an update query or a VBA that will look for the number from
Field1 of Table1 in Field1 of Table2 and put the corresponding number (i.e.,
Field2 of Table2) in Field11 of Table1. (Similar to VLOOKUP in EXCEL).
Similarly, go to the next number and look for Field2 of Table1 in Field1 of
Table2 and put the corresponding number(i.e., Field2 of Table2) in Field12 of
Table1. Continue this till Field20 of Table1 and then move to the next record
of Table1.
Once everything is done, sum up the values from Field11 to Field20 in Table1
and put the value in Field21 of Table1. Do this till the last record.
Doing this thask in EXCEL is very simple and I can do it but my database has
1 Lac+ records which Excel cannot handle. Can anybody help me on this?
Maxi
(Field1,Field2.....Field21). Table2 has 2 fields (Field1 and Field2)
Field1 to Field10 of Table1 has random numbers from 1-100. Field11 to
Field21 of Table1 has all BLANK records.
Field1 of Table2 has 100 records (These fields contains numbers from 1-100
in ascending order). Field2 of Table2 has 100 records (All random numbers
from 1 to 15)
I am looking for an update query or a VBA that will look for the number from
Field1 of Table1 in Field1 of Table2 and put the corresponding number (i.e.,
Field2 of Table2) in Field11 of Table1. (Similar to VLOOKUP in EXCEL).
Similarly, go to the next number and look for Field2 of Table1 in Field1 of
Table2 and put the corresponding number(i.e., Field2 of Table2) in Field12 of
Table1. Continue this till Field20 of Table1 and then move to the next record
of Table1.
Once everything is done, sum up the values from Field11 to Field20 in Table1
and put the value in Field21 of Table1. Do this till the last record.
Doing this thask in EXCEL is very simple and I can do it but my database has
1 Lac+ records which Excel cannot handle. Can anybody help me on this?
Maxi