Re: Referencing a sum query result in a text box

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Darrell Cyphers (DC_at_sd.com)
Date: 06/07/04


Date: Mon, 07 Jun 2004 08:56:12 -0700

It was a single result, so the provided code worked
perfectly! Thank you!

Steve Schapel wrote:
> Darrell,
>
> It depends really on the specifics of what you mean. If you have a
> query that just returns one value, or one record, you could use an
> expression similar to this in the Control Source of your textbox,
> presumably on a form or a report...
> =DLookup("[NameOfTotalField]","NameOfQuery")
> If you have a query that produces totals according to groupings of your
> data, and if this is related to the other data in the form/report, and
> if a form, assuming you don't need to edit or enter data, you can
> probably include the totals query into the existing query that the form
> is based on.
> If this doesn't help, please post back with more details of what you are
> trying to achieve.
>



Relevant Pages

  • Re: Report is making too many numbers
    ... Am I supposed to attached the new totals query to the already existing ... where the Award is stored. ... FROM LongSheetPrimContInfo LEFT JOIN LongSheetSubContInfo ON ...
    (microsoft.public.access.reports)
  • Re: Populate Field Based on Value of Previous Record
    ... base the data sheet on the normal query, ... The totals query is used to get the previous odo. ... Remove the field called PreviousODO - you can always find the value ...
    (microsoft.public.access.forms)
  • Re: Running Totals On QueryDef In Code
    ... with the query as a source. ... You could also use a totals query as you mentioned, but do it all in code. ... Dim DB As DAO.Database ... Dim intNumOfPaid, intNumOfHypoed, intNumOfNotTaken, intNumOfDeclined, ...
    (comp.databases.ms-access)
  • Re: Counting 3 different fields seperately on a report
    ... I created the 'totals query' and put in the criteria Like "X" but when I go ... "Jeff Boyce" wrote: ... Access asks you for a value (via a parameter prompt) when it can't find the ...
    (microsoft.public.access.reports)
  • Re: TWO Crosstab Query Ouput Questions
    ... locations for each species as rows with the Banding ... all recoveries in that location for each of those species. ... the SQL of the current crosstab query looks like this: ... concerning the Totals Query. ...
    (microsoft.public.access.queries)