Access XP/2003 & Subforms challenge

L

littledragons4

I have a subform with dollar values, and have subtotaled
them in the footer of the subform as you're supposed to.
The main form then has a field that links to the subtotal,
and then adds it to other values on the main form to
obtain the total amount. All that is working great, my
subtotals and totals are calculating correctly. HOWEVER
whenever I run queries or generate reports, I get a value
of 0 for the total field on the main form (that is
calculated based on values from the main form plus the
subtotal from the subform). How do I fix this problem? The
whole point of doing a subform was to total multiple
entries for one item in the main table, and I need to
generate reports that show what the totals of the items
are. Thanks in advance.
 
D

Duncan Bachen

I have a subform with dollar values, and have subtotaled
them in the footer of the subform as you're supposed to.
The main form then has a field that links to the subtotal,
and then adds it to other values on the main form to
obtain the total amount. All that is working great, my
subtotals and totals are calculating correctly. HOWEVER
whenever I run queries or generate reports, I get a value
of 0 for the total field on the main form (that is
calculated based on values from the main form plus the
subtotal from the subform). How do I fix this problem? The
whole point of doing a subform was to total multiple
entries for one item in the main table, and I need to
generate reports that show what the totals of the items
are. Thanks in advance.

If you are doing calculations on the form to obtain your total, you're
going to have to do those same calculations in your query or in your
report to obtain the same total.

Alternately you can run the report while the form is open, and
directly reference the field on the form.

That's limiting your design though, because it's forcing you to run a
report for only one record at a time. Not sure exactly what your needs
are.


-D
 
L

littledragons4

Thank you. I've tried repeating the calculations in the
query, but the problem is that it doesn't allow me to
include the subtotal field from the subform. I'm assuming
it's because it resides in the footer. So I tried it by
including the total field from the main form (that pulls
from the subform), but even though the total field on the
form shows the correct amount it still comes out at zero
in the query.

The database is to help me track my eBay sales. One item
may have multiple listings if it didn't sell the first
time, which is why I created the subform for the
listings. I need to add in all the fees associated with
the listings (the subform) to all the fees in the item
form (the main form) in order to figure out what my net
value is for the sale of the item. Keeping the form open
while running the report won't help because I'd like to
generate a report that shows all sales for the month, all
fees, and net sales.
 
D

Duncan Bachen

Thank you. I've tried repeating the calculations in the
query, but the problem is that it doesn't allow me to
include the subtotal field from the subform. I'm assuming
it's because it resides in the footer. So I tried it by
including the total field from the main form (that pulls
from the subform), but even though the total field on the
form shows the correct amount it still comes out at zero
in the query.

The database is to help me track my eBay sales. One item
may have multiple listings if it didn't sell the first
time, which is why I created the subform for the
listings. I need to add in all the fees associated with
the listings (the subform) to all the fees in the item
form (the main form) in order to figure out what my net
value is for the sale of the item. Keeping the form open
while running the report won't help because I'd like to
generate a report that shows all sales for the month, all
fees, and net sales.

Well if you create a query with totals, you can add sum all the fees
together and find out what your fees per item listed were.


-D
 

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