>Hi. I have this form, which acts as a general report driver screen. It contains a listbox. The listbox is populated from a database and contains the name of a report. When the user clicks on a report name, and then clicks Print, I want to execute some code that sets up the report (as these are complex reports based on preprocessing and sql queries). I want to be able to set up a new method in the listbox control, to allow me to 'call' that code when the print button is pressed. I have alot of reports and don't want to hardcode 'CASE REPORT=1 do blah blah blah, CASE REPORT = 2, etc.' in the form level custom method. Can anyone clever tell me a way to accomplish this?
>
>Thanks for your help.
>
>Sandi Cassidy
Hi Sandy,
I the database, which describes your reports, you may have a memo field, like RepInit. In this field you can have something like:
[opentable('MyTable',"MyTag")]. OpenTable would be a common function.
In our system we use MetaFiles to describe reports, quieries, formats, etc.
Hope you understand this idea.
If it's not broken, fix it until it is.
My Blog