Can someone post the VBA assigned to a click button event:
If new record is dirty then undo, open form1, and close form2. Else open form1 and close form2.
Thanks.
Can someone post the VBA assigned to a click button event:
If new record is dirty then undo, open form1, and close form2. Else open form1 and close form2.
Thanks.
Since you want to 'open form1, and close form2, in either case,' you don’t need an 'else' clause, so
Code:Private Sub YourButtonName_Click() If Me.NewRecord And Me.Dirty Then Me.Undo End If DoCmd.OpenForm "Form1" DoCmd.Close acForm, "Form2" End Sub
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007
Thanks so much. This helped me out a lot today. I was able to finish a HUGE chunk of the project. Thanks again.
Glad we could help!
Good luck with your project!
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007