Lisa,
We're just going in circles here...
There are only two possibilities here. Either you're not expressing what you need from
the Dsum properly, or there is some misconception about where the DSum is trying to get
the values it needs to return the proper sum value.
One more try... please answer specifically...
1. Is the calculated field (the DSum) on the Main Form? (I assume yes) What is that
field's Name?
2. Is Company field on the Main form, or the Subform form?
3. The Main form is named Registrations. If Company is on the subform, what is the
subform Name?
4. Given the sample data you provided would you expect the DSum you have now to return
$1630
rather than the correct $930.
5. Is the DSum you're looking for independent of any Package differences? Yes or No.
Next to Last resort... if I still have questions after the above are answered.
Can you send me the .mdb? (front and backend if needed/confidentiality assured/no
charge)
1. Zip the file/s and send using my web Contact address. (address below-must be
10MB or less)
2. Include "Newsgroup" in your subject.
3. Indicate what Access version you're using..
4. Post back here that you have/ have not sent the file.
Last Resort... if sending not possible...
A completely new post.
--
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> You wrote:
>
>> In your example data, would that mean it returned $1630? If so then make sure
>> you...
>> 1. Use the exact NAME of the form
>> 2. Use the exact NAME of the text control that contains the Company value.
>
> Ok, the name of the form is Registrations and the name of the txt field
> on the form is Company (from the Registrations Table) This is why I am
> at a loss.
>
>>
>> You wrote...
>> Are you saying that the total you want for Ohio Health may depend on a particular
>> Package?
>
> This is hard to explain via this medium but the Registration form has
> an Attendees sub form. In that form, there's a drop down for packages
> (among other stuff). When selected, it enteres the company name (from
> registrations) and room price in the attendees table for that record.
> The reason I need this to total on the regsitration form and not the
> sub form is because another sub form in getting prices for something
> else (and putting it in a seperate table) The client wants all these
> totals to sum on the registration form (broken out by type). Therefore
> my total on the form looks like:
>
> Total Deposits (This is a seperate table)
> Discounts - (this is entered manually)
> Packages + (this is the Attendees Table)
>
> Total Amount: (this will be the total of everything)
>
>
> You wrote:
>> If not, and all is as you indicated, then the DSum above is correct for total Room
>> Price against Ohio Health.
>
> I agree - that's why I have no idea why it's not working 
>
> ~L~
>
>> --
>> hth
>> Al Campagna
>> Candia Computer Consulting - Candia NH
>> http://home.comcast.net/~cccsolutions
>>
>> <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > Al,
>> > here is sample date in table Attendees
>> >
>> > Company Name Room Price(this depends on what package they picked)
>> > Ohio Health $350
>> > Ohio Health $450
>> > Ohio Health $130
>> > Americheer $300
>> > Americheer $400
>> >
>> > what I need is for when we are at the Ohio Health record on the form -
>> > the txtTotal be $930. Then when we click the next record button (which
>> > is Americheer) the txtTotal = $700.
>> >
>> > Make sense?
>> > Lisa
>> >
>> >
>> >
>> >
>> > Al Campagna wrote:
>> >> Lisa,
>> >> If there is more than one room price associated with a Company, then you will get
>> >> the
>> >> sum of all those prices.
>> >> > =DSum("[Room Price]","Attendees","[Company] =
>> >> > [Forms]![Registrations]![Company]") and it gave me a sum of all prices
>> >> Well, that's what your asking for with your DSum...
>> >> If there are 4 rooms rented to XYZ company, your DSum will add up the price for
>> >> all
>> >> 4
>> >> rooms.
>> >>
>> >> Give us some example data... what you have vs. what you want to extract from
>> >> data,
>> >> with
>> >> examples.
>> >>
>> >> (A minor point... please don't delete the previous posts from the thread. That
>> >> way
>> >> anyone can see the flow of the problem, and what steps have been covered already.)
>> >> --
>> >> hth
>> >> Al Campagna
>> >> Candia Computer Consulting - Candia NH
>> >> http://home.comcast.net/~cccsolutions
>> >>
>> >> <(E-Mail Removed)> wrote in message
>> >> news:(E-Mail Removed)...
>> >> > Al,
>> >> > Ok I tried
>> >> > =DSum("[Room Price]","Attendees","[Company] =
>> >> > [Forms]![Registrations]![Company]") and it gave me a sum of all prices
>> >> >
>> >> > I tried:
>> >> > =DSum("[Room Price]","Attendees","[Company] =
>> >> > [Forms]![frmRegistrations]![Company]") and it gave me a #Error
>> >> >
>> >> > I tried:
>> >> > =DSum("[Room Price]","Attendees","[Company] =
>> >> > [Forms]![frmForm]![Company]")and it gave me a #Error
>> >> >
>> >> > any idea?
>> >> >
>> >> > Lisa
>> >> >
>> >
>