Hi,
I guess you should use the DSum function:
The DSum function is mostly used in forms/reports to dynamically
sum/aggregate the values.
The syntax of the same would be found in the help of Access...
Regards,
Vinayak
(E-Mail Removed) wrote:
> I need a txtTotal textbox to sum all the prices in the table attendees
> for a certain school
> I created a query:
>
> SELECT Sum(Attendees.[Room Price]) AS SumOfRoomPrice
> FROM Attendees, Registrations
> WHERE (((Registrations.[School Or
> Organization])=[Forms]![Registrations]![School Or Organization]));
>
> Any ideas how I do this?
> i tried txtTotal.Value = DoCmd.OpenQuery "Attendee_Price"
>
> OR
>
> How does DLookup work? I tried doing that in the Control Source of the
> textbox but it was giving me all the prices, not just the prices for
> [School Or Organization]
>
> and I need to make sure that when the user clicks the next record, it
> only shows the price for that record (School or Organization)
>
>
> Thanks in advance
> Lisa