H
Hector
Hi, I have two related problems, when generating reports from a modal dialog
box.
The dialog box accepts report criteria and then either previews or prints
the report depending on a choice made from the main menu. The main menu is
used to enter the criteria applicable to all reports that can be generated
and I thought I'd use a dialog box to accept the unique criteria applicable
to this one report.
Still with me?
Prob 1. When previewing the report. The report is generated and the dialog
box closes ok but I want the focus to switch to the new tab containing the
report and not the menu form. Can't get that working.
Prob 2. When printing the report. I get a system msg telling me the report
is printing but my report isn't printed and the dialog box doesn't close. It
goes into some black hole somewhere - not even shown in the print queue. Its
using the default printer and other apps print ok.
This is the VB code I'm using for the dialog box's OK button.
DoCmd.OpenReport "Attendance Report", Me.OpenArgs, , sqlText
DoCmd.Close acForm, "Attendance Dialog", acSaveNo
Me.OpenArgs comes from the initial menu and is either acViewNormal or
acViewPreview.
sqlText is the additional report criteria.
Any thoughts? Thanks in advance
box.
The dialog box accepts report criteria and then either previews or prints
the report depending on a choice made from the main menu. The main menu is
used to enter the criteria applicable to all reports that can be generated
and I thought I'd use a dialog box to accept the unique criteria applicable
to this one report.
Still with me?
Prob 1. When previewing the report. The report is generated and the dialog
box closes ok but I want the focus to switch to the new tab containing the
report and not the menu form. Can't get that working.
Prob 2. When printing the report. I get a system msg telling me the report
is printing but my report isn't printed and the dialog box doesn't close. It
goes into some black hole somewhere - not even shown in the print queue. Its
using the default printer and other apps print ok.
This is the VB code I'm using for the dialog box's OK button.
DoCmd.OpenReport "Attendance Report", Me.OpenArgs, , sqlText
DoCmd.Close acForm, "Attendance Dialog", acSaveNo
Me.OpenArgs comes from the initial menu and is either acViewNormal or
acViewPreview.
sqlText is the additional report criteria.
Any thoughts? Thanks in advance