Storing a date in the main form from the subform

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
 
G

Guest

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?
 
P

Pieter Wijnen

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

HtH

Pieter
 

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