views:

216

answers:

2

I have a form with two subforms, both of which are continuous. Each form has a field to accept the name of the person who created the record. Almost every time, the same person will be creating all of the records, so it would be really convenient if the fields would autofill once the main record has been set.

I've tried several approaches to this, but none seem to work quite right (e.g., the first of the continuous forms won't autofill because it came into existence alongside the main record). This is Access 2003.

Thanks in advance for your help, and let me know if I can clarify the situation for you at all.

+1  A: 

It may be best to set the default value of the control in the after update event for the control. This means that it will fill with whatever the previous value was.

Me.SomeText.DefaultValue= """" & Me.SomeText & """" ''Text
Remou
Also a great answer, but the users preferred the other method. Thank you, though.
Matt Parker
+1  A: 

OnCurrent, OnClick, etc...

If IsNull(Me.MyField) or Me.MyField = "" Then

  Me.MyField = Me.Parent.MyRelatedField

End If
David Walker