M
mjbarnard
I have a problem which has been reported here before but which I can't
seem to solve.
A primary form has a number of command buttons which open new forms.
These work fine and the new forms open in front and with focus.
The On Open event of the primary form has code which checks whether any
patients have not been seen for a specified number of days, and if so
opens another form. However this form always opens behind the primary
form, and cannot be accessed until the first form is closed. This is
not desirable as the first form is used repeatedly.
The pop-up and modal values of the primary form are both set to No.
In the On Open event I can set the focus to a control in the second
form if it opens - and the focus goes there - but the form still
remains behind the primary form.
I can get around it by setting the second form to open as acDialog -
but this brings problems of its own (always in front - and it in turn
is used to open another form).
The thing I don't understand is why new forms open properly (in front)
when opened with a command button (via code) but not when opened from
the On Open event?
Any ideas?
seem to solve.
A primary form has a number of command buttons which open new forms.
These work fine and the new forms open in front and with focus.
The On Open event of the primary form has code which checks whether any
patients have not been seen for a specified number of days, and if so
opens another form. However this form always opens behind the primary
form, and cannot be accessed until the first form is closed. This is
not desirable as the first form is used repeatedly.
The pop-up and modal values of the primary form are both set to No.
In the On Open event I can set the focus to a control in the second
form if it opens - and the focus goes there - but the form still
remains behind the primary form.
I can get around it by setting the second form to open as acDialog -
but this brings problems of its own (always in front - and it in turn
is used to open another form).
The thing I don't understand is why new forms open properly (in front)
when opened with a command button (via code) but not when opened from
the On Open event?
Any ideas?