Report displays as tray icon; want Preview mode

L

L Mehl

Hello --

Problem:
A report opened in acViewPreview mode displays as a tray icon, rather than
in Preview mode.

The report used to print OK, and I can't remember what code I might have
changed to cause the problem.

Is this enough of a sketch of the code to help me figure out what is wrong?

--------------------------------------------
'open report manager
DoCmd.OpenForm "frmMenuReports"

'on this form, choose to print selected records
click cmdPrintSelectedRecords 'this opens the next form

'open the form on which user selects record
DoCmd.OpenForm "frmSelectLot", acNormal, , ,
acFormEdit, acDialog,

'on this form, print the report
click cmdContinue 'opens the report
DoCmd.OpenReport "rptTrnsact", acViewPreview, , WHEREclause_to_select_record

(The report displays as icon in tray)

DoCmd.Close acForm, "frmSelectLot"
 
S

SA

Larry:

Part of the problem may be that you are launching the report from a form
that you've set to be a modal dialog. Report's can't pop to the front of
the screen on top of a modal dialog. Try eliminating the acDialog option on
your form
 
L

L Mehl

SA --

Thank you for responding.

When I remove "acDialog" in

DoCmd.OpenForm "frmSelectLot", acNormal, , , acFormEdit, acDialog,
OpenArgs:=g_strOpenargs

WindowMode defaults to acWindowNormal

Problem:
frmSelectLot does not stay on the screen so that a record can be selected
from it.

Is there code to add in frmSelectLot to make it persist on the screen so
that I can select a record from it?

Can you continue to help me figure out how to fix this?

Thanks,

Larry
 
L

L Mehl

I solved the problem by

Forms("frmSelectLot").Visible = False

after the records were selected, and closing the form after that.

Thanks for listening.

Larry Mehl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top