Forms & Sums

M

mandy84angel

I am new with Access, thank you ahead of time for your help!

I need two forms, Products & Categories, to show like the below.
In the Products form, I need to know how to sum the types for each product.
In the Categories form, I need to be able to sum the types of all products.

Ex:
Product Form: Each Product is a different Record. The four different types
are listed within each record.

Product 1 Product 2 Product 3
Type A 15 13 16
Type B 8 17 14
Type C 11 9 10
Type D 12 18 7
Total 46 57 47
(Total is the automatic addition of ABCD as they are entered, for that
particular record)

Categories Form: (Automatically counted from adding individual types within
products form. This form brings it all together on one record)

Total Type A 44
Total Type B 39
Total Type C 30
Total Type D 37
Overall Total 150

I hope I explained it clearly.
Thanks again!
 
G

Golfinray

Put a text box under each of those columns. In each text box, go to
properties. Go to control source and type:
=sum([your field])
 
M

mandy84angel

Thank you for the quick response.
In testing, I put:

Product 1
Type A 1
Type B 2
Type C 3
Type D 4
Total ___

For total, in the properties, control source, I did: =sum([A]++[C]+[D])
Results were it being: '1234' ... I need it to show '10'
I am using the expression builder when I do it.
Thank You!

Golfinray said:
Put a text box under each of those columns. In each text box, go to
properties. Go to control source and type:
=sum([your field])

mandy84angel said:
I am new with Access, thank you ahead of time for your help!

I need two forms, Products & Categories, to show like the below.
In the Products form, I need to know how to sum the types for each product.
In the Categories form, I need to be able to sum the types of all products.

Ex:
Product Form: Each Product is a different Record. The four different types
are listed within each record.

Product 1 Product 2 Product 3
Type A 15 13 16
Type B 8 17 14
Type C 11 9 10
Type D 12 18 7
Total 46 57 47
(Total is the automatic addition of ABCD as they are entered, for that
particular record)

Categories Form: (Automatically counted from adding individual types within
products form. This form brings it all together on one record)

Total Type A 44
Total Type B 39
Total Type C 30
Total Type D 37
Overall Total 150

I hope I explained it clearly.
Thanks again!
 
K

KARL DEWEY

Each Product is a different Record. The four different types are listed
within each record.
What is the structure of your table - field names and datatype? Post same
data.
 
M

mandy84angel

Textbox in which I am putting in the total numerical amount for that type.

Field Name: Sample Number:
Elem 1
Sec 2
DO1 3
DO2 4
Coun 5
Lib 6
Other 9

I created a Total textbox and in properties, control source, I put the
following:
=Sum([Elem]+[Sec]+[DO1]+[DO2]+[Coun]+[Lib]+[Other])

Not only did it give me “1234569†instead of “30â€, if I add another record,
it shows on the new record “1234569†as well. I need each sum to be
individually added per record. Am I supposed to do something in the footer
and hide it???
 
K

KARL DEWEY

I asked what is the datatype of the fields, not about your form.

You should be using a query to do the math.
--
KARL DEWEY
Build a little - Test a little


mandy84angel said:
Textbox in which I am putting in the total numerical amount for that type.

Field Name: Sample Number:
Elem 1
Sec 2
DO1 3
DO2 4
Coun 5
Lib 6
Other 9

I created a Total textbox and in properties, control source, I put the
following:
=Sum([Elem]+[Sec]+[DO1]+[DO2]+[Coun]+[Lib]+[Other])

Not only did it give me “1234569†instead of “30â€, if I add another record,
it shows on the new record “1234569†as well. I need each sum to be
individually added per record. Am I supposed to do something in the footer
and hide it???
 
G

Golfinray

You have to put that total textbox in the footer of the report or form. The
footer of the whole page. You would have to go to the bottom and drag down to
put it there. Otherwise, it will give you wrong answers.

mandy84angel said:
Textbox in which I am putting in the total numerical amount for that type.

Field Name: Sample Number:
Elem 1
Sec 2
DO1 3
DO2 4
Coun 5
Lib 6
Other 9

I created a Total textbox and in properties, control source, I put the
following:
=Sum([Elem]+[Sec]+[DO1]+[DO2]+[Coun]+[Lib]+[Other])

Not only did it give me “1234569†instead of “30â€, if I add another record,
it shows on the new record “1234569†as well. I need each sum to be
individually added per record. Am I supposed to do something in the footer
and hide it???
 
M

mandy84angel

Thank You!

Golfinray said:
You have to put that total textbox in the footer of the report or form. The
footer of the whole page. You would have to go to the bottom and drag down to
put it there. Otherwise, it will give you wrong answers.

mandy84angel said:
Textbox in which I am putting in the total numerical amount for that type.

Field Name: Sample Number:
Elem 1
Sec 2
DO1 3
DO2 4
Coun 5
Lib 6
Other 9

I created a Total textbox and in properties, control source, I put the
following:
=Sum([Elem]+[Sec]+[DO1]+[DO2]+[Coun]+[Lib]+[Other])

Not only did it give me “1234569†instead of “30â€, if I add another record,
it shows on the new record “1234569†as well. I need each sum to be
individually added per record. Am I supposed to do something in the footer
and hide it???

KARL DEWEY said:
Each Product is a different Record. The four different types are listed
within each record.
What is the structure of your table - field names and datatype? Post same
data.
--
KARL DEWEY
Build a little - Test a little


:

I am new with Access, thank you ahead of time for your help!

I need two forms, Products & Categories, to show like the below.
In the Products form, I need to know how to sum the types for each product.
In the Categories form, I need to be able to sum the types of all products.

Ex:
Product Form: Each Product is a different Record. The four different types
are listed within each record.

Product 1 Product 2 Product 3
Type A 15 13 16
Type B 8 17 14
Type C 11 9 10
Type D 12 18 7
Total 46 57 47
(Total is the automatic addition of ABCD as they are entered, for that
particular record)

Categories Form: (Automatically counted from adding individual types within
products form. This form brings it all together on one record)

Total Type A 44
Total Type B 39
Total Type C 30
Total Type D 37
Overall Total 150

I hope I explained it clearly.
Thanks again!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top