i've "data-entry mode" (de) subform being used on 2 parent forms. fortunately, continuous "gratuitous" subform same on both parent forms. i cannot correct syntax accommodate appropriate hosting of data entry form. i'd know of generic method, save having modify code if choose use de subform on third or fourth parent form.
private sub addchild_click()
on error goto err_addchild_click
if me.dirty = true me.dirty = false
if me.name = [f_partner_detail_edit] 'f_partner_detail_edit 1 of 2 parent forms
[forms]![f_partner_detail_edit]![fsb_child_exist_list_viewedit].requery 'requery gratuitous listing
elseif me.name = [f_child_list_viewedit] then 'f_child_list_viewedit is other of 2 parent forms
[forms]![f_child_list_viewedit]![fsb_child_exist_list_viewedit].requery 'requery gratuitous listing
end if
docmd.gotorecord , , acnewrec 'force new record, because de subform fails go "data entry" on open
exit_addchild_click:
exit sub
err_addchild_click:
msgbox err.description
resume exit_addchild_click
end sub
Office / Access / Windows other / Office 2010
Comments
Post a Comment