G
Guest
I have created a system with a table having multiple records, each having
multiple numerical data fields. What i want to do is to combine the totals of
each of these fields across the records and have the combined totals put in
to a second table as a single record entry.
E.G. - First table
ID* | Option 1 | Option 2 | Option 3
1 | 2 | 3 | 5
2 | 4 | 7 | 2
E.G. - Second Table
ID* | Option 1 | Option 2 | Option 3
1 | 6 | 10 | 7
I have found that I can create individual summary queries for each of the
fields (i'm talking a lot of fields - about 40-45) but I cannot create a
single query that summerises all the fields at the same time. Also i have
found that when i try to link multiple summary queries in to a single form
which also has a different table feeding in to it that it will not allow such
a data source to exist.
I know there is a way to use VB code to pull data from a form but what I
would like to know is if there is a VB coding i could use to pull the data
from the queries and put them all together as a single record in the new
table. For example i could have the VB code run automatically when the data
entry form for the table is closed. I do not mind having to put a single
entry in for each query to pull the data to the table.
E.G. - VB Code
(Table 2, Record 1, Field 'abc').value = (data from query one)
To allow for a better simulation prospect for any helpers, both of the
tables (original and summary) have the same field layout and names. Three of
the fields are called:
"Shirts 15"
"Shirts 15-5"
"Shirts 16"
The fields could be renamed if VB is not happy with the spaces.
I have queries for each of those fields which summarise the data in them as
a single total:
"Sum of Shirts 15"
"Sum of Shirts 15-5"
"Sum of Shirts 16"
So in the format I am looking for:
Table!'Table2'!'Record 1'!'Shirts 15'.value = Query!'Sum of Shirts 15'!'Sum
of Shirts 15'.value
That is the style i am looking for but it has been a long while since i did
any coding on VB and thus I am unable to remember any methods for doing such
a task. Thank you in advance to anyone willing to help.
multiple numerical data fields. What i want to do is to combine the totals of
each of these fields across the records and have the combined totals put in
to a second table as a single record entry.
E.G. - First table
ID* | Option 1 | Option 2 | Option 3
1 | 2 | 3 | 5
2 | 4 | 7 | 2
E.G. - Second Table
ID* | Option 1 | Option 2 | Option 3
1 | 6 | 10 | 7
I have found that I can create individual summary queries for each of the
fields (i'm talking a lot of fields - about 40-45) but I cannot create a
single query that summerises all the fields at the same time. Also i have
found that when i try to link multiple summary queries in to a single form
which also has a different table feeding in to it that it will not allow such
a data source to exist.
I know there is a way to use VB code to pull data from a form but what I
would like to know is if there is a VB coding i could use to pull the data
from the queries and put them all together as a single record in the new
table. For example i could have the VB code run automatically when the data
entry form for the table is closed. I do not mind having to put a single
entry in for each query to pull the data to the table.
E.G. - VB Code
(Table 2, Record 1, Field 'abc').value = (data from query one)
To allow for a better simulation prospect for any helpers, both of the
tables (original and summary) have the same field layout and names. Three of
the fields are called:
"Shirts 15"
"Shirts 15-5"
"Shirts 16"
The fields could be renamed if VB is not happy with the spaces.
I have queries for each of those fields which summarise the data in them as
a single total:
"Sum of Shirts 15"
"Sum of Shirts 15-5"
"Sum of Shirts 16"
So in the format I am looking for:
Table!'Table2'!'Record 1'!'Shirts 15'.value = Query!'Sum of Shirts 15'!'Sum
of Shirts 15'.value
That is the style i am looking for but it has been a long while since i did
any coding on VB and thus I am unable to remember any methods for doing such
a task. Thank you in advance to anyone willing to help.