Getting Calculated Totals from a form into a table

spiderq

New member
Local time
Yesterday, 20:30
Joined
Mar 27, 2004
Messages
6
I need some advice about how to copy/enter/export some calculated fields from a form into a table(with the same field names).
I have a form based on a query which finds all the archers who have shot a score based on a Division parameter, this may be 2 or 5 archers, depending on the division.The form adds up the Total Hits etc in a textbox.

I want to enter these totals into a table which I can then query later on and create a report.
I have tried a number of options: DSum( which I did not really understand), exporting the form into Excel table and then importing again but this messes up my Data Types.
I'm sure I need to use some VB but not sure what.
Any Ideas? :confused:
 

Attachments

spiderq said:
I need some advice about how to copy/enter/export some calculated fields from a form into a table(with the same field names).
I have a form based on a query which finds all the archers who have shot a score based on a Division parameter, this may be 2 or 5 archers, depending on the division.The form adds up the Total Hits etc in a textbox.

I want to enter these totals into a table which I can then query later on and create a report.
I have tried a number of options: DSum( which I did not really understand), exporting the form into Excel table and then importing again but this messes up my Data Types.
I'm sure I need to use some VB but not sure what.
Any Ideas? :confused:


If the data is in a table or query.. you should be able to get these values you are looking for if you... create a query, then click the totals symbol to make it into a total query, you should get what you want after grouping by division.

To do this from a form's textbox values.. yes, you will use VBA. Can you give us an example of the form and any relevant details? (IE. Not all the values are entered into the same textbox, are they? If so, how? Where do these values come from? etc.)
 
re calculated totals

o1110010 said:
If the data is in a table or query.. you should be able to get these values you are looking for if you... create a query, then click the totals symbol to make it into a total query, you should get what you want after grouping by division.

To do this from a form's textbox values.. yes, you will use VBA. Can you give us an example of the form and any relevant details? (IE. Not all the values are entered into the same textbox, are they? If so, how? Where do these values come from? etc.)

Yes- I did try using the "Totals" option in the query but it just gave me the total of each individual archer so not sure what I was doing wrong- I have attached more details to explain what I'm doing.Hopefully someone can make some suggestions.
 

Attachments

Sounds like your query is "grouping" by the archers ID and therefore summing each archers score. If you take out the archers ID then it would sum all the scores, if you add the Division ID then it would group by Division and sum for each division.

It's just a case of trying to get the query to do the calculations for you, you really don't need or want to save these figures to another table.

HTH

DBL
 
DBL said:
Sounds like your query is "grouping" by the archers ID and therefore summing each archers score. If you take out the archers ID then it would sum all the scores, if you add the Division ID then it would group by Division and sum for each division.

It's just a case of trying to get the query to do the calculations for you, you really don't need or want to save these figures to another table.

HTH

DBL

Thanks for the suggestion - I have tried that but still can't get it to work - not really sure what I'm doing wrong? :confused:
 
Looking at the example you posted, you need to create a query that only has the Division column (group by) the colums you want to Sum: Hits, Scores, Golds and the Month if you want to group by that too. Any additional fields are going to cause the query to sum by additional the groupings.
 

Users who are viewing this thread

Back
Top Bottom