Need some help on a command which would close any on screen active form. I want to have this Esc key enabled as an autokey to close any screen active form. I know how this autokey thing works but unable to figure out proper code.
If you put a button on the form that closes it with:
DoCmd.Close acForm, Me.Name, acSaveNo
And set the button's Cancel Property (on the Other Tab in the properties dialog) to YES then if someone hits the escape key it will act as if pressing that button.
If you put a button on the form that closes it with:
DoCmd.Close acForm, Me.Name, acSaveNo
And set the button's Cancel Property (on the Other Tab in the properties dialog) to YES then if someone hits the escape key it will act as if pressing that button.
It doesnt seem to be saving.... Esc thing is perfectly working but it doesnt save. when I click that button anc close it saves record. But when I hit Esc key and close it doesnt save the record
And also any idea which I can have this Button thing Invisible. when I try Visible =No on property dialog box the command doesnt work.
The button has to be visible to be used, but it should be able to be set so you can't see it. Try setting the measurements to something like .01" width and .01" Height.
The button has to be visible to be used, but it should be able to be set so you can't see it. Try setting the measurements to something like .01" width and .01" Height.