Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old August 12th, 2003, 01:48 PM
utmostrusselb utmostrusselb is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Canada
Posts: 40 utmostrusselb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Quick Question

Hi, this is an easy question. I know this to be true because I have done this a while ago and I don't have access to the code anymore. I can't find a thing in the VB Help about it either. Here we go...

I need to print an Access report called "TbMainReport.rpt". Secondly, how can I send parameter with the request? For instance, patient 124 on 2/3/03? Thanks a million.
__________________
Best regards,
Russ Bergen
Senior Software Developer and Webmaster

Reply With Quote
  #2  
Old August 16th, 2003, 01:31 PM
utmostrusselb utmostrusselb is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Canada
Posts: 40 utmostrusselb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Got My Answer

I ended up using a Common Dialog control. I highly recommend these easy to use controls to add a professional touch.

Dim BeginPage, EndPage, NumCopies, Orientation, i
Dim acApp As Access.Application
BlCancelError = False
' Set Cancel to True.
CommonDialog1.CancelError = True
On Error GoTo ErrHandler
' Display the Print dialog box
CommonDialog1.ShowPrinter
' Get user-selected values from the dialog box.
BeginPage = CommonDialog1.FromPage
EndPage = CommonDialog1.ToPage
NumCopies = CommonDialog1.Copies
Orientation = CommonDialog1.Orientation
For i = 1 To NumCopies
Set acApp = New Access.Application
acApp.OpenCurrentDatabase "C:\mjcc\dblab.mdb"
acApp.DoCmd.OpenReport "tbMainReprt", acViewNormal
acApp.Quit
Set acApp = Nothing
Next
Exit Sub

ErrHandler:
If Err.Number = 32755 Then
BlCancelError = True
Exit Sub
End If

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Quick Question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway