我有一个表单“列表”,它列出了一组记录,并有编辑按钮 . 单击此(编辑)按钮将打开另一个“编辑”表单,用于编辑所选记录 .

enter image description here

当我处于被调用(编辑)形式时, I need a VBA generic code that returns the caller (列表)形式,也就是说,当我处于"Edit"形式时,它应该返回"List" .

Private Sub Form_Close()
  ' This works but is static
  Forms!frmMSourceList!lstBox.Requery
  ' This works but requires passing arguments
  Forms(Me.OpenArgs)!lstBox.Requery
End Sub

如果我可以避免使用DoCmd.OpenForm中的OpenArgs传递本地/临时变量甚至参数,那将会很棒 .

事先提前 .