Passing Parameter to Access DB Report from VB6

Stop MS Access Report from prompting for param in VB6

Page 1 of 1

0 Replies - 775 Views - Last Post: 28 October 2010 - 12:02 PM Rate Topic: -----

#1 kbolles  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 28-October 10

Passing Parameter to Access DB Report from VB6

Posted 28 October 2010 - 12:02 PM

I have a simple VB project that contains one form which asks for a begin date and end date, and has a command button to run a report. I call a Microsoft Access Report that has an Access query. I've tried to call the Access report with the begin date and end date parameters that were entered on the form, but when the VB program brings up the Access report, it still prompts me to enter the begin date and end date, rather than using the passed parameters.

How do I pass the parameters? I've tried code a few different ways, as well as code similar to the following:

objAccess.DoCmd.OpenReport ReportName, acViewNormal,,,,BeginDateValue & EndDateValue

I appreciate any help.
Thanks.

Is This A Good Question/Topic? 0
  • +

Page 1 of 1