General information
Title:
Cannot access the selected table Error 1152
My entire application is working smoothly, but there's always that one last unexpected thing....I get the error...
"You have attempted to select a table outside the 32K work area range or are attempting to reference a file variable in a table that is not open."
All my reports are done in the Report Designer of VFP5.0a with the exception of a report that has to send output to Excel. It executes flawlessly if I execute it from VFP with DO finance_excel as a .prg
This is the code:
-------------
use send_to_excel &&A view composed of two other views and one base table
SET SAFETY OFF
COPY fields except travnbr_b, travnbr_c to c:\temp\text.xls type xls
SET SAFETY ON
USE
tmpsheet=getObject('','excel.application')
oExcel = tmpsheet.application
oExcel.workbooks.open("c:\temp\text.xls")
oExcel.visible = .t.
oExcel.cells.select
oExcel.selection.columns.autofit
oExcel.range("A1").select
release oExcel
----------------
When I run the application by executing the main program directly from the project manager, everything comes up fine - forms, reports that were done in the report designer with their own DEs, until I try to run the above program. It is executed from the reports form which has a list box. When I click on the Run button, this code executes:
LOCAL lcSeleRepo
*!* lcSeleRepo = "REPORTS\" + ALLTRIM(repoList.cname) + ".FRX"
IF ALLTRIM(repolist.cname) = "finance_excel"
DO finance_excel.prg
ELSE
........ etc.
The program is executed, but then it bombs and says the table is already in use when it is not. The view did have parameters, but I took them out and stripped the base table out of the view, and I still have these problems. I have no idea what is going on.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only