Hi all,
I have this code in a project which will input the beginning page and the ending page..Im using the data report in VB6..
VB Code:
On Error GoTo errReport rptCustomers.PrintReport True, rptRangeFromTo, pagefirst,pagelast Unload rptCustomers
Another one is the code to print access report using VB
VB Code:
Dim appaccess As New Access.Application appaccess.OpenCurrentDatabase App.Path & "\mydbase.mdb" appaccess.Visible = False appaccess.DoCmd.OpenReport "rptEmployee", acViewNormal appaccess.Quit Set appaccess = Nothing
How can I enhance the second code (print access reports using VB) by prompting the user to input pagefirst and pagelast similar to the code using data report? Is there a possiblity to send the pagefirst and pagelast values to the appaccess.DoCmd.OpenReport? Or is there an equivalent code for my idea?
VB Code:
pagefirst = Val(InputBox("Input beginning page to be printed")) pagelast = Val(InputBox("Input last page to be printed")) appaccess.DoCmd.OpenReport "rptEmployee", acViewNormal
Thanks....![]()
![]()
![]()




Reply With Quote