Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error 1152 appearing in code where previously not errors appeared 1

Status
Not open for further replies.

Charterhouse

Programmer
Sep 25, 2006
12
0
0
GB
Using VFP6 SP5 » Error 1152 (Cannot access the selected table) keeps appearing in code where previously not errors had been found. The messagebox appears, OK is pressed, and the program continues to find the table OK. This is an EXE working on a standalone PC using local tables. Is this a case of the VFP6 being impatient? Any suggestions?
 
Here are a couple of things to look for .

You have attempted to
1. select a table outside the 32K work area range or
2. are attempting to reference a file variable in a table that is not open.

This error can occur under the following condition:
A table or cursor that is specified for the RowSource property of a ComboBox or ListBox control is closed.

1. If you want to close a table or cursor that is specified for the RowSource property of a ComboBox or ListBox control, perform either of the following actions prior to closing the table or cursor:
Set the RowSource property to an empty value ("").
-OR-
Release the form containing the ComboBox or ListBox control.

2. A SQL SELECT statement that recreates a table or cursor that is specified by the RowSource property is issued. When the SQL SELECT statement executes, Visual FoxPro closes then opens the table.

To avoid this error, set the RowSource property to an empty value (""), issue the SQL SELECT statement, and reset the RowSource property to its previous value.


David W. Grewe Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top