I have two forms: Form1 and Form2.
Form1 contains demographic information.
Form2 opens from Form1 via a command button.
Form2 contains data that can be sent to Form1 by clicking a command button (cmdSend) on Form2.
The code under lying cmdSend is:
Forms!Form1.RFirstName = me.FirstName
Forms!Form1.RLastName = me.LastName
and so on…
On Form1 I have cmdCloseWithOutSaving which becomes visible when Form1 is Dirty.
(Event On Dirty: Me.cmdCloseWithOutSaving.Visible = True)
The purpose of cmdCloseWithOutSaving is to allow the user to undo any changes made to Form1.
The Event on Dirty works correctly if the data in Form1 is entered or edited via the keyboard.
But when I enter or edit the data on Form1 by sending the data from Form2, Form1 does not become dirty and cmdCloseWithOutSaving does not become visible.
How do I get Form1 to become dirty when sending data from Form2.
Thank you for your help.
Form1 contains demographic information.
Form2 opens from Form1 via a command button.
Form2 contains data that can be sent to Form1 by clicking a command button (cmdSend) on Form2.
The code under lying cmdSend is:
Forms!Form1.RFirstName = me.FirstName
Forms!Form1.RLastName = me.LastName
and so on…
On Form1 I have cmdCloseWithOutSaving which becomes visible when Form1 is Dirty.
(Event On Dirty: Me.cmdCloseWithOutSaving.Visible = True)
The purpose of cmdCloseWithOutSaving is to allow the user to undo any changes made to Form1.
The Event on Dirty works correctly if the data in Form1 is entered or edited via the keyboard.
But when I enter or edit the data on Form1 by sending the data from Form2, Form1 does not become dirty and cmdCloseWithOutSaving does not become visible.
How do I get Form1 to become dirty when sending data from Form2.
Thank you for your help.