Max query results

M

MaRSMAN

Table is Communion
fldCommunionID autonumber
fldCommunionDate date
fldCommunicant number relaated to tblSouls fldSoulID
I would like a query to show the groupby communicant and then select each
communicants max date and update that communionDate to a fldLastCommuned in
the tablequerySouls Extended
would this work best as a mudular VBA code I am not to good at doing VBA
code yet
Thanks in advance to ALL who help me out on this
 
P

pietlinden

Table is Communion
fldCommunionID  autonumber
fldCommunionDate    date
fldCommunicant    number       relaated to tblSouls  fldSoulID
I would like a query to show the groupby communicant and then select each
communicants max date and update that communionDate to a fldLastCommuned in
the tablequerySouls Extended
would this work best as a mudular VBA code I am not to good at doing VBA
code yet
Thanks in advance to ALL who help me out on this

Either I'm missing something or your question does not make sense.
Unless you're storing the "LastCommuned" date somewhere (WHY??? You
can use a SQL statement to calculate it for you on the fly!)

If you just calculate on the fly, you don't need any code at all.
What did you need to do with this? If you're going to do a mail merge
or similar, you can just create another query and include both the
ChurchMember table (or whatever you call it) and this totals query and
include other values. Michel Walsh has an article on this at
www.mvps.org/access
 
M

MaRSMAN

SQL is what i want
The first part is to get the max communion date for each churchmember from
thecommunion table the next step is to take the max communion date from
each church member and update the fld Lastcommuned that is located in the
churchmember table.
Hope this clarifies better also please note I am using Access 2007
An Example woould help me out
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top