Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing parameters from VB procedure to report

Status
Not open for further replies.

stalo

Programmer
May 1, 2001
35
CY
Hi

I am using Access 2000, ADO, and I have an on-click procedure that updates some tables and at the end calculates two numbers and prints a report. I am using these two numbers as a parameter to produce a reference report for my users using Between .. AND in the reports record source.

Note that all these run in the same procedure, with some messages to guide the used in between.

I want to automatically pass these values to the report without the user having to know about it.

Some code I am using is:

MsgBox "Number A" & I & " and " & P & "." & vbCrLf & "Number B.", vbInformation, "Note!"

Dim stDocName As String

stDocName = "InvNoStatusChSend"
DoCmd.OpenReport stDocName, acViewNormal


Thanks!
 
Hi,
I wrote an FAQ on how to use "filter" to send criteria to the report. Here it is: faq703-2657

HTH, [pc2]
Randy Smith, MCP
California Teachers Association
 
Randy:

I used your FAQ as a starting point, but I've got multiple list boxes with muti-select values (see post thread703-609559 modified your code so that I can have 2 list boxes, but as you can see with the nesting, it's going to get very ugly. Any ideas? Thanks in advance.

Jim DeGeorge [wavey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top