Update Main Form Using Subform

  • Thread starter Thread starter YankeesFan
  • Start date Start date
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
 
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))
 
Back
Top