Please help,
I have more than one cancel button which is made visible depending on the previous form that has opened the current form.
ie. on Form1
FORMS!frmSub!cancelbuttonfrm1.visible=true
or Form 2
FORMS!FrmSub!cancelbuttonfrm2.visible=True
I want it to run an undo before closing, undo the previous form and close back to the mainmenu. However if the form isnt dirty (No changes have been made) then when the undo is called i get a run time error.
So why not do it as on dirty cancelbuttonfrm1.visible=true i hear you ask, well how can i make different buttons visible dependant on the previous form?
Obviously Access knows that the form is dirty because it triggers the undo or do you want to save.
So can i not just do 'IF Frmsub is dirty then undo else close form'
I have more than one cancel button which is made visible depending on the previous form that has opened the current form.
ie. on Form1
FORMS!frmSub!cancelbuttonfrm1.visible=true
or Form 2
FORMS!FrmSub!cancelbuttonfrm2.visible=True
I want it to run an undo before closing, undo the previous form and close back to the mainmenu. However if the form isnt dirty (No changes have been made) then when the undo is called i get a run time error.
So why not do it as on dirty cancelbuttonfrm1.visible=true i hear you ask, well how can i make different buttons visible dependant on the previous form?
Obviously Access knows that the form is dirty because it triggers the undo or do you want to save.
So can i not just do 'IF Frmsub is dirty then undo else close form'