
Passing input box value from Form Module to report module
Richard --
Cool it with the multiple postings, OK?
To do what you asked:
Create a new module (I would call it Globals).
In it, create a global variable of type integer and a public
function of type integer that returns the value of the global. (You can make
a get/set function with an optional second parameter for setting and use a
static procedure-level variable instead of the global if that is more your
style.)
During processing, set the global variable to the response from the
input box.
In the report, use the function to obtain the value.
However, it sounds like what you really need to create a query for your
report that joins all the tables containing potentially useful information.
Then, when your code does openreport, set the WHERE parameter to a string
you have built that limits the data to the client and proposal that the user
is really interested in. Using DLookup etc. is very slow compared to
restricting the query, especially if you have indexes on the join fields.
HTH, Roger
Quote:
>Can I pass an integer(ProposalID) from an input box of a form class module
>to the report onopen event?
>The forms module runs script which opens the report.
>I need the proposal ID to dlookup some information that I want to add to
the
>report...ie Client Name, which is linked to the Proposal Table.
>Process is as follows:
>List box form opens with a list of all the reports.
>Double click on the report and the report is processed.
>During the process, an input box prompts the user for the proposal number
>he/she wishes to print.
>I need to pass the proposal number to the report so I can include the
>proposal number on the report and dlookup the Clients Name and add it to
the
>report too....
>Thanks!
>Richard Sbragia
>Atlanta