Generate *.SNP file and then display in .SNP ActiveX Control

D

dch3

I've built a wizard in which users enter a new order. As the last step in the
wizard, I want to create a snapshot of the Order Recap and then display the
snapshot in the SnapShot ActiveX control that I've embedded in the wizard. I
do not want the user to see the report offscreen - just in the ActiveX
control. I also want the report to be generated and completed before moving
to the page with the AX control.

1) How do I run the report with the appropriate WHERE statement and then
output the report to acFormatSNP so that the report is not seen by the user?

2) When I tried this...

DoCmd.OpenReport "rptOrder_Detail", acViewPreview, , "lngOrderId = " &
Me.pg2_lstParts, acHidden
DoCmd.OutputTo acOutputReport, "rptOrder_Detail", acFormatSNP,
"C:\Temp\rptOrder_Detail.snp", False
DoCmd.GoToPage (3)

The DoCmd.GoToPage(3) crapped out giving me a 'You cannot go to the page'
error.
 
D

dch3

Well this solved the problem of generating the report...

DoCmd.Echo False
DoCmd.OpenReport "rptLoadList_Detail", acViewPreview, ,
"lngLoadListHeaderId = " & Me.pg2_lstLoadLists, acHidden
DoCmd.OutputTo acOutputReport, "rptLoadList_Detail",
acFormatSNP, "C:\Temp\rptLoadList_Detail.snp", False
DoCmd.Close acReport, "rptLoadList_Detail", acSaveNo
DoCmd.Echo True

But I'm still at a lost as to the problem with the DoCmd.GotoPage
The specific error is 'The page number you used as an argument for the
GoToPage action or method doesn't exist in this form.' (I soo love having two
monitors.)
 
D

dch3

[Forms]![frmOrders].setFocus before the DoCmd.Gotopage(3) fixed the problem.

Darn if you can't delete a post...
 

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