br***@aristotle .net wrote:
Thanks for the suggestion but sadly it did not work in my situation. I
have a modal form that begins an import process into my database from
an external comma delimited file. If there are any warnings to be
displayed, a second modal form pops up displaying the warnings in a
listbox. If the user wants a report of these, there is a command
button that brings up a report in preview mode that he/she can then
print out. Unfortunately the two modal forms that are being displayed
at that time prevent the report from coming to the forefront unless I
open the report with the acDialog parameter or at least set the popup
property to true in the report, but setting popup to true has the
unfortunate side effect of getting rid of the toolbars. Unfortunately
setting the modal property doesn't bring the report to the forefront
when previewed from a modal form. I ended up just making the command
button print the report rather than display it in preview mode as this
made more sense anyway (they've already got the form to see the
warnings on). At any rate, thanks for the suggestion!
What about playing with modal and popup properties of the two forms via
the proc associated with the command button on the second modal form?
Something like (aircode):
Private Sub btnShowErrorRep ort_Click()
me.modal = false 'second form
'It may or my not be necessary to setfocus to the form before changing
modal property, I don't know
forms!frmImport Form.modal = false 'first form1
DoCmd.OpenRepor t "MyReport", acViewPreview
End Sub
The report would not have to be modal
In the on close event of the report:
Private Sub rptErrorReport_ Close()
'As per the abov proc, it may or my not be necessary to setfocus to the
form before changing modal property, I don't know
'the order in which these are made modal might have some effect, I
don't know.
formsfrmError.m odal = true 'second form
forms!frmImport Form.modal = true 'first form
End Sub
Whether you twiddle with the modal properties in VBA or not I would
personally redesign my process so that I could get the report preview
first. Perhaps by having the import process close all other forms and
the closure of the main form in the import process causing the closing
of any related forms or report previews.
OTOH, if the report only shows what the error form is displaying in the
list box, then going straight to the printer would be acceptable in my
opinion, anyway.
And, after having written all the above, it occurs to me that my previou
paragraph may wel be the way to go, but I'm too ticked with myself to
erase everything above it!!! 8) 8) 80
--
Tim
http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me