Hi I have a main form for data entry.. on lost focus a popup form (Modal) opens then I need to enter some data. after that is a button to close the popup form.. then... I want my main form to set a new record.. but it was adding the data that was retained when I opened my popup form.. so I tried to look for a code that will delete it.. but I dont want the warning message to show.. how to do this.. I have a sample code but does not work....Thanks
Private Sub Form_Unload(Cancel As Integer)
DoCmd.OpenForm "FrmPayroll"
DoCmd.SetWarnings False
Me.Undo
DoCmd.SetWarnings True
DoCmd.GoToRecord , , acNewRec
End Sub
Private Sub Form_Unload(Cancel As Integer)
DoCmd.OpenForm "FrmPayroll"
DoCmd.SetWarnings False
Me.Undo
DoCmd.SetWarnings True
DoCmd.GoToRecord , , acNewRec
End Sub