|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Quick Question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|