No Paul, you were clear. I was assuming you clicked a button or something to generate the report. In the button code before the call for the report simply add the line:
writeEnvironmentString("myVar",ReportTitleVar)
Where "myVar" (quotes required) is the environment variable you are creating, and ReportTitleVar is a string variable to which you assign the return value from your title naming form. Don't forget to declare ReportTitleVar in your var/endvar statement.
In your report design, add an unbound field where you want the title. Right-click the field and choose 'define field'. When the dialog box opens, check the 'calculated field' box and put this code in the calculation blank:
readEnvironmentString("myVar"
When you run the report using your code, the report title appears. If you do it manually using QBE there will be no title since the ReportTitleVar variable is never assigned.
Mac
"There are only 10 kinds of people in this world... those who understand binary and those who don't"
langley_mckelvy@cd4.co.harris.tx.us