Hi
I am new to this forum and also to vba programming. I need help urgently.
Have developed a program using MS Access. It was working well until lately my machine was upgraded with Office 360.
Somehow when I try to print report with the code below, the command window will open to prompt user to select a location to save the report, and after that it hangs....and I have to kill the task through task manager.
'string value to pass in to the report in Ms Access.
strCriteriaToRpt = "7372Z"
DoCmd.OpenReport "View Remarks of Students", acViewNormal, , strCriteriaToRpt
However, if I were to change the program to the code below, the user will not be allowed to choose the location to save the report, but instead system will save the report to the location that I have specified. And the program works fine.
DoCmd.OpenReport "View Remarks of Students", acViewPreview, , strCriteriaToRpt
MyPath = "D:\SIS\Report_" & strStudentID & ".pdf"
DoCmd.OutputTo acOutputReport, "", acFormatPDF, MyPath, False
Can someone enlightened me how I can resolve the problem above? Appreciate.
I am new to this forum and also to vba programming. I need help urgently.
Have developed a program using MS Access. It was working well until lately my machine was upgraded with Office 360.
Somehow when I try to print report with the code below, the command window will open to prompt user to select a location to save the report, and after that it hangs....and I have to kill the task through task manager.
'string value to pass in to the report in Ms Access.
strCriteriaToRpt = "7372Z"
DoCmd.OpenReport "View Remarks of Students", acViewNormal, , strCriteriaToRpt
However, if I were to change the program to the code below, the user will not be allowed to choose the location to save the report, but instead system will save the report to the location that I have specified. And the program works fine.
DoCmd.OpenReport "View Remarks of Students", acViewPreview, , strCriteriaToRpt
MyPath = "D:\SIS\Report_" & strStudentID & ".pdf"
DoCmd.OutputTo acOutputReport, "", acFormatPDF, MyPath, False
Can someone enlightened me how I can resolve the problem above? Appreciate.