Question

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.

Was it helpful?

Solution

OnCurrent, OnClick, etc...

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

  Me.MyField = Me.Parent.MyRelatedField

End If

OTHER TIPS

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top