Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Aggregate query woes.

Status
Not open for further replies.

rafe

Technical User
Aug 18, 2000
194
US
Scenario:

I have a “Documents” table linked one-to-many to a “Payments” table. We process documents at the College but the level of accounting is line items on a document (i.e. Payments). I’ve got a “ProcessDocuments” form that does things like print the appropriate document, e-mail’s people about the outcome of the processing, prints envelopes, what have you; all done at the document level. This form is a continuous form linked to the “Documents” table. Filters are performed depending on the function being done. Some key identifying elements of documents are totals from the Payment line items. Like: Sum([Payments]![Amount]), Min([Payments]![FromDate]), or Max([Payments]![ToDate]), etc.

The user, me, flags a document for processing by clicking on a Yes/No field called “Select” in the “Documents” table. Note that this “Select” field is the only user modifiable field for the form, aside from some unlinked header section option controls.

Problem:

What I want to do is link the form to a query that will have some of these identifying aggregate functions in it. However, by putting them in a query I am unable to modify the “Select” check box. The only alternative I’ve been able to come up with is to add fields to my “Documents” table that hold these totals. I know that this is ***bad*** to do but I can’t think of another option.

Thought I’d solicit ideas from the community.

 
Talking to myself again...

Now I've learned all about the wonders of Domain aggregate functions & now I'm Domain aggregate happy.

It's not Sum([Amount])

In this case it's...

DSum("[Amount]","Payments","[DocID]=" & [DocID])
DMin & DMax
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top