My Assistant
![]() ![]() |
|
|
Jan 30 2008, 08:41 PM
Post
#1
|
|
|
UtterAccess Addict Posts: 107 |
Ok what an exciting adventure
A report is called from frmFacultyBudgetReport. This form has parms that are passed to the report. Whe the form is called from the main menum, it all works great because I can print from the toolbar Print icon (the desired outcome). - The event procedure for form is stDocName = "rptFacultyBudgetReport_A" DoCmd.OpenReport stDocName, acPreview - The modal and popup are both No But when the report is called from an intermediate Data Entry screen, things go awry. Here's the sequence --Main Menu which calls --frmX (cbo year selection) which calls --Data Entry screen, which calls --frmFacultyBudgetReport (as above) which calls --rptFacultyBudgetReportA (as above) The frmx Event Procedure: --stDocName = "frmFacultyBudgetHeader" --DoCmd.OpenForm stDocName, , , stLinkCriteria The Data Entry Screen Printer Icon Event Procedure: --stDocName = "frmFacultyBudgetReport" --DoCmd.OpenForm stDocName, acNormal, , , , acDialog --DoCmd.Close acForm, stDocName (A) The frmFacultyBudgetReport Event Procedure is same as shown at the top: --stDocName = "rptFacultyBudgetReport_A" --DoCmd.OpenReport stDocName, acPreview Here's what happens: --The report is displayed but behind the frmFacultyBudgetReport --The user cannot click on the report at all. So taking the hint about closing frmFacultyBudgetReport above, I added the following right after the open in (A) --stDocName = "frmFacultyBudgetReport" (B) DoCmd.Close acForm, stDocName The upshot: - The form is closed - The report is displayed - The report is displayed hidden UNDER the data entry screen - I click on the report - I click on the toolbar printer icon - The message Now Printing is displayed - An error appears "The expression is typed incorrectly or is too complex to be evaluated" Something I think is wrong with (B) Anyone think they got it? Paul |
|
|
|
Feb 3 2008, 07:13 PM
Post
#2
|
|
|
UtterAccess VIP Posts: 18,396 From: Oklahoma City, Oklahoma |
The issue is probablywith this:
--stDocName = "frmFacultyBudgetReport" --DoCmd.OpenForm stDocName, acNormal, , , , acDialog --DoCmd.Close acForm, stDocName I woudl remove the: DoCmd.Close acForm, stDocName line In the "frmFacultyBudgetReport", when the user click "contiues" or "OK" you need to set the form's visible proper;y to NO. This will allow the report to stil up the pop up form and the report will display on top. |
|
|
|
Feb 4 2008, 03:41 PM
Post
#3
|
|
|
UtterAccess Addict Posts: 107 |
WOW!. Great job Batman Boyd! Yes, that fixed it.
But why did it fix it? What was the message all about? What expression did it think was typed incorrectly? Paul |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 20th May 2013 - 09:47 AM |