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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cannot access selected table 1

Status
Not open for further replies.

Supi

Technical User
Oct 29, 2001
2
CH
I tried to open a new Form by using the DblClick Event of a listbox. The new Form opens regulary. But when I close the new Form and turn back to the old one, the Message appears 'Cannot access selected table'. If I do the same thing by using a button to open the new form (instead of the listbox-DblClick-Method), no error message appears. The
AutoCloseTables property of both forms dataenvironments is turned .T.
What's wrong. Please help, I need to finish my project
 
Hello.

The second form closes the table (or the cursor) used as rowsource to listbox from the first form.

Because the behaviour is only in the doubleclick, check again the listbox, especially the click, doubleclick and interactivechange events. Is no use to check the second form; if the second form is wrong, the message should appear in any circumstances. But this thing doesn't happen, so the error is located in the first form's lisbox. Take a look closely.

Another possible cause for this error message (but is very improbable) is: in the second form you have an cursor with the same name as the cursor used for rowsource in the listbox. In this case, the second cursor will destroy the first one, and the message is exactly what you have.

Hope this helps.
Grigore Dolghin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top