Need Help print Access report from vb6

A

Angel b1

Hello,

I have a Vb 6 application that prompts the user for the criteria used in a
access97 report and then prints the Access report.
I would like to see just the ONE prompt, VB OR the Access criteria prompt.
Im currently getting two prompts.
The parameter string in VB matches the one in the Access query criteria


Here is my code

result = InputBox("Enter Starting Range, MMYYYY", vbOKCancel, "Print
Invoices")

Set appAccess = New Access.Application
appAccess.OpenCurrentDatabase
"c:\vb_projects\PriorAuthInvoice\PriorAuthInvoice.MDB"
Set qrySelectCurrentInvoices =
appAccess.CurrentDb.QueryDefs("qrySelectInvoices")
qrySelectCurrentInvoices.Parameters("Enter Invoice Date:") = result
appAccess.DoCmd.OpenReport "TBLINVOICE", acViewPreview

Screen.MousePointer = vbHourglass
appAccess.DoCmd.PrintOut acPrintAll
appAccess.CloseCurrentDatabase
appAccess.Quit
Set appAccess = Nothing



Expand
 

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