calculating a total of a calculated field on a subform

G

Guest

i have a main form, units, with a subform, parts.

in the subform i have a total for each line of the continuous form. this
gives me a qty multiplied by the price total in a calculated control. this
works fine.

the calculated field needs to be totaled at the subform footer. how do i do
this? i have been trying all of the suggestions i can find, but none seem to
do anything. i have even tried to do it on the main form. nothing works.
 
V

Van T. Dinh

Check the "Orders Form" in the sample database "NorthWind" that is usually
installed with Access software. It shows exactly the technique you need ...
 
G

Guest

Hello

that was helpful. it shows me their method for doing that calculation.

however that wont work for what i am trying to implement. the subform is not
a query in this case where i can do the extended price calculation. it is a
subform that edits a table, it is for adding records to the database for what
parts makes up the mainforms machine. in order to do what the northwind
database does i would need to have a query, and then i wouldnt be able to
edit the data in the subform.

it has given me a few thoughts about my current structure and the way i add
parts to the main form machines, though. i may end up changing the
functionality of the main form and subform quite a bit. currently the user
adds parts by adding in the part number on the subform. i might rework the
showing details part of the sub form to do what the northwind does and add an
additional subform for entering the parts.

thanks for the pointer to more information.
 
V

Van T. Dinh

Dawn

Queries can be either updatable or not updatable. In fact the Query used in
the Subform for the "Orders Form" in NorthWind is updatable (only the
ExtendedPrice Column is not updatable).

Without knowing your set-up and relying wholly on your description, I still
think that you can create an updatable Query like in NorthWind to use as the
RecordSource for your Subform.
 
G

Guest

Hello

actually i did one better. i created a new subform with a backend query that
calculated the extended price and then put a subtotal in the form footer.

the cool thing was i took the form that was directly looking at the table
and turned it into a way to enter new parts and add them to the list showing
above. now no one can edit the list directly they use the second subform
instead. big helpful userfriendly buttons show where and what to do now as
well.

thanks for pointing me to that link, it caused me to rethink my methodology.
 

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