Update Main Form Using Subform

Y

YankeesFan

Hi,

I've got a main from, this is a company's name, address, and a couple
of chkboxes and a textbox LastUpdate
There is a subform with contact names and phone numbers, if a change
is made to the phone number, I want the LastUpdate to reflect =now()

Any change to main form already shows it properly.

Thanx
 
A

Allen Browne

Do not store in the main form's table the date of the last update to a
record in another table (i.e. the subform's table.)

Instead, add a LastUpdate field to the subform's table as well. You can then
determine the date of the last update from the highest value for any of the
related records.

The text box on the main form that shows the last update for the related
records in the subform would have something like this in its Control Source:
=DMax("LastUpdate", "MyRelatedTable",
"MyForeignKeyID = " & Nz([MyMainID],0))
 

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