Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access2000 - ActiveX Common Dialog Control

Status
Not open for further replies.

Sensibilium

Programmer
Apr 6, 2000
310
GB
Does anyone know how to set which report the print dialog will print in VBA?<br>Here's my code so far:<br><br>dlgCommon.Flags = cdlPDAllPages<br>dlgCommon.ShowPrinter<br>Reports(&quot;PurchaseOrderReport&quot;).SelPrint _<br>dlgCommon.hDC<br><br>See what I'm trying to do? Please help, I've been trying to work this for months!<br><br>Thanks<br>
 
I Have only used Common Dialog box with Opening files<br>Suggest you use Access forms etc to pick reports.<br><br>
 
Erm... Okay...<br><br>My problem isn't with picking the report, it's making the print dialog box popup when a 'Print' button is pressed on my form... (The button wizard creates a button that sends the data straight to the wrong printer without opening the print dialog box).<br>The default printer is not the printer to be used...
 
Ok so in the code change the<br>from &quot;acViewNormal&quot;&nbsp;&nbsp;&nbsp;&lt;&lt;&lt;&lt; Direct to Printer<br>to &quot;acPreview&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;&lt;&lt;&lt; Print Preview<br><br>DoCmd.OpenReport &quot;rpt-MachineryOrder&quot;, acPreview<br><br>And when you use the Wizard to create a Print button if you look you will also see an option to Print Preview instead of just Print<br><br>Or if it is going to the wrong printer and you want it to print directly Do these steps:<br><br>1. Open your report in Design view<br>2. Click the &quot;File&quot; menu then click &quot;Page Setup&quot;<br>3. Click the &quot;Page&quot; TAB<br>4. Check &quot;Use Specific Printer&quot; at the bottom.<br>5. Click the &quot;Printer...&quot; button<br>6. Choose your Printer from the list<br>7. Click OK<br>8. Ajust Landscape or Portrait.<br>9. Click the Margins TAB and adjust if needed.<br>10. Click OK<br>11. Click &quot;File&quot; menu then Click &quot;Save&quot;&nbsp;&nbsp;&lt;&lt;&lt;&lt;&lt; very important<br>&nbsp;<br>Next time you print it should work fine<br><br>
 
Aha! Thank you doug, I'll try that!<br><br>PS: It took me so long to notice your reply, as I assumed 3 responses included my second entry, but obviously that's not true!<br><br>Once again, Thanks for all your help, it is much appreciated :eek:)
 
Well there an e-mail option at the bottom of every new post.<br>It's there so you don't have to check.<br>It will e-mial you when a new response comes in.<br><br>&quot;Check box to mark this ...........<br>Right above the Submit button<br><br><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top