Displaying max value in main datasheet from subdatasheet

D

deekay

I have a contacts datasheet form and an actvities subdatasheet and I
would like to display a field called 'code' in the activities in the
main form.

The contacts form shows details of contacts from companies - names,
surname, company etc
The activities subform shows details of interactions with contacts,
including log date and a field called 'code' and 'activity' details
about the nature of the conact.

I want to display the last 'code' in the activities subdatasheet that
is associated with the last activity of any contact.

I should be able to do this by getting the max value of activity_id
for a contact and then getting the 'code' associated with that.

The problem is that
1) the main form is in datasheet view and the subform is a
subdatasheet (our users just prefer it that way).
2) the methods i've seen on this group work only when in single record
view.
3) I need to be able to keep the main contacts and activities form
updateable (so sql aggregation is not helping)

Can anyone help.
 

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