Storing a date in the main form from the subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form and subform.

The subform is continuous and it contains a date field. In the header of the
subform I have a textbox to hold the most recent date.

What I would like to do is store the most recent date in a date field in the
main form.

Cheers
 
I am almost there.

When I enter a date into the continuous subform, the date field on the main
form gets updated with the date before the field on the subform was updated
rather than the date (if that makes sense)

I think it is possible that when I move to the main form (it is on a tab),
the cursor remains in the subform so it isn't able to save the record and
can't update the date field.

hmm...

ideas?
 
Private Sub Form_AfterUpdate() ' In Sub Form
Me.Parent.DateField.Value = Me.DateField.Value
End Sub

HtH

Pieter
 
Back
Top