M
mac_see
I have 164 tables in my database (table names = 1, 2, 3, ..... 164). Every
table consists of 5 Fields (Field1, Field2, Field3, Field4 and Field5)
Field1, Field2, Field3 & Field4 has will have 50-150 records (these are
random numbers from 1 to 100). The count of records will differ from table to
table. Example Table (1) may have 75 records and (2) may have 102 records
..... etc.
Field5 is a calculated field that has a value which is difference of Field4
and Field1 (Field4-Field1)
I have another table (table name = check) with five fields; Filed1, Field2
(field name = Min), Field3 (field name = Max), Field4 and Field5. (All fields
are of number INTEGER data type.
Field1 of the check table has 164 records. It contains serial numbers from 1
to 164. Rest all the 4 fields are blank.
I want to run a Query/VBA that will check the minimum number in Field5 of
Table (1) and should update Record 1 of Min field in the check table.
The query should then check the maximum number in Field5 of Table (1) and
should update Record 1 of Max field in the check table.
The query should then check the maximum number in Field4 of Table (1) and
should update Record 1 of Field4 in the check table.
The query should then check the count (number of records) of Field1 of Table
(1) and should update Record 1 of Field5 in the check table.
Do the same task for all 164 tables.
1
=
f1 f2 f3 f4 f5
1 2 15 20 19
5 4 9 18 13
6 8 9 11 5
2
=
f1 f2 f3 f4 f5
2 3 9 20 18
3 5 11 18 15
6 12 13 21 15
12 13 21 28 16
Check
=====
F1 Min Max f4 f5
1 5 19 20 3
2 15 18 20 4
table consists of 5 Fields (Field1, Field2, Field3, Field4 and Field5)
Field1, Field2, Field3 & Field4 has will have 50-150 records (these are
random numbers from 1 to 100). The count of records will differ from table to
table. Example Table (1) may have 75 records and (2) may have 102 records
..... etc.
Field5 is a calculated field that has a value which is difference of Field4
and Field1 (Field4-Field1)
I have another table (table name = check) with five fields; Filed1, Field2
(field name = Min), Field3 (field name = Max), Field4 and Field5. (All fields
are of number INTEGER data type.
Field1 of the check table has 164 records. It contains serial numbers from 1
to 164. Rest all the 4 fields are blank.
I want to run a Query/VBA that will check the minimum number in Field5 of
Table (1) and should update Record 1 of Min field in the check table.
The query should then check the maximum number in Field5 of Table (1) and
should update Record 1 of Max field in the check table.
The query should then check the maximum number in Field4 of Table (1) and
should update Record 1 of Field4 in the check table.
The query should then check the count (number of records) of Field1 of Table
(1) and should update Record 1 of Field5 in the check table.
Do the same task for all 164 tables.
1
=
f1 f2 f3 f4 f5
1 2 15 20 19
5 4 9 18 13
6 8 9 11 5
2
=
f1 f2 f3 f4 f5
2 3 9 20 18
3 5 11 18 15
6 12 13 21 15
12 13 21 28 16
Check
=====
F1 Min Max f4 f5
1 5 19 20 3
2 15 18 20 4