access vba - How can I set the value of a field located in a subform equal to a field on the main form after update? -


i creating form using access 2010 update table. have field, start date, in subform. set required in table properties. have field end date outside of subform. when user enters start date, end date should automatically populate same value.

i tried following, receiving message "you must enter value in position.startdate' field.

private sub startdate_afterupdate() if not isnull(me.startdate) me.startdate = me.enddate end sub 

the main form parent:

private sub startdate_afterupdate()      if not isnull(me!startdate.value)         me.parent!enddate.value = me!startdate.value     end if  end sub 

Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -