With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!
Dim WithEvents m_ParentForm As Access.Form Dim m_AccessApp As Access.Application Private Sub UserControl_Show() If Ambient.UserMode Then Set m_ParentForm = Extender.Parent.object Set m_AccessApp = m_ParentForm.Application end if end sub Private Sub cmdAdd_Click() Dim wCancel As Boolean wCancel = False RaiseEvent BeforeAdd(wCancel) If Not wCancel Then m_AccessApp.DoCmd.GoToRecord acDataForm, m_ParentForm.Name, acNewRec RaiseEvent AfterAdd End If End Sub Private Sub m_ParentForm_Current() MsgBox "Current" End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.