Hi Glenn.
>Too bad execscript knows nothing about the EXE or APP.
It actually makes sense once you realize what EXECSCRIPT() does:
- It outputs the code string to a temporary PRG
- It compiles that PRG
- It runs the resulting FXP
- It deletes the PRG and FXP files
Since the code is actually in an external FXP when it executes, it doesn't know anything about what's inside the EXE. One solution is to write the FRX/FRT files out to disk before using EXECSCRIPT() and then delete them afterward. Another is to call back into the EXE to actually run the report. For example:
oApp.RunReport('Whatever.FRX')
Doug