Disable form

  • Thread starter Thread starter Jan Nordgreen
  • Start date Start date
J

Jan Nordgreen

I use winxp and access2000.

1. Is there a way to disable or lock a form so when it is clicked it doesn't
get focus?

2. Is there a way for a form to find out which form was active just before
it was clicked ('who clicked me?'). If there is, then I could call that form
from the gotfocus method and that would answer question 1.

Thanks for any help.

Sincerely,

Jan Nordgreen
 
Jan Nordgreen said:
I use winxp and access2000.

1. Is there a way to disable or lock a form so when it is clicked it doesn't
get focus?

If you disable all the enterable controls (Enabled=False), the form will not
accept the focus, I think. You could do this through code defined in a
public sub of the form's module. Then, other forms could call that sub to
disable or re-enable the form as required.

2. Is there a way for a form to find out which form was active just before
it was clicked ('who clicked me?'). If there is, then I could call that form
from the gotfocus method and that would answer question 1.

Try screen.previousform (screen.previoscontrol?) or somesuch - I can't quite
remember. But - if you allow the form to be clicked, it might run some
events that you don't want (eg. Form_Current), so it might be too late to
un-click it, no?

HTH,
TC
 
Back
Top