Van,
Ok now the pop-up window appears and asks me for the Company, then the
package -and if I click "Cancel" the packages in my Attendees subform
are now gone. I'm guessing my problem is the form is pulling from
Registrations, but the info I need is from a subform Attendees, but
needs to be displayed in the Registration form. Form looks like this:
Form: Registrations (pulling from table Registrations)
Company
Address
Phone #, etc
there are several sub forms in the main form.
Sub Form: Attendees within Registration Form (pulling from Attendees
table)
Contact Name, Check-In Date, Arrival Date, Package, Extra Days,
etc...for as many people that are coming to the event
package is a drop down pulling from a package table that has the name
and the room price, when they select a package, it enters the room
price in the Attendees Table.
Then on the Registration form, there is a Finance section that has a
total of all the sub forms:
Total Deposit
Total Discounts
Total Packages (which is the one that is not working)
Total Amount Owed
nothing I try works. I keep getting a total of all the records in the
Attendees table, not just the one for the current company.
IM at a loss
Van T. Dinh wrote:
> Not sure but try:
>
> =DSum("[Room Price]","Attendees",
> "[Company] = """ & [Forms]![Registrations]![Company] & """")
>
> I assumed the [Company] Field is a Text Field and the value of the Control
> [Forms]![Registrations]![Company] is also of Text DataType corresponding to
> the Filed [Company].
>
> Note that if you use ComboBox or ListBox, the value of the Control may be
> entirely different from what you see on the Form. If this is the case, make
> sure the BoundColumn of the Control corresponds to the Field [Company]
>
> --
> HTH
> Van T. Dinh
> MVP (Access)
>