Passing input box value from Form Module to report module 
Author Message
 Passing input box value from Form Module to report module

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



Fri, 01 Jun 2001 03:00:00 GMT  
 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



Sun, 03 Jun 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Passing an integer from an input box of a forms class Module to a report module open event

2. passing a value from a report code module

3. Passing Value from Module Function to Form sub problem

4. Pass variable value back to form from module

5. Debug a module that changes code in a report module

6. Pass variable form module to a form

7. How do you pass from obj from one form to a module/forms

8. passing forms and controls so I can set focus back to a form from a module

9. passing forms and controls so I can set focus back to a form from a module

10. Modules, Modules, Modules

11. vb4: bas modules and form modules

12. Q: Code Module vs UserControl (Form, Class) module.

 

 
Powered by phpBB® Forum Software