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

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
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
 
Hi!

Your listbox base on the table or select statement or alias. This is very strange and weird bug in VFP related to the record in the source used by list box. Despite containing of all list in the list array, listbox for some reason tries to access table/cursor used as row source. When it is not accessible (for example, because current data session os gone out of scope, table is locked etc etc), you will have such message.

I solve this problem by manual filling of combo box list using AddItem or AddListItem methods in the scan loop for cursor. Put this code in the requery method of combobox and set the row source type to 0.

Vlad Grynchyshyn
vgryn@softserve.lviv.ua
The professional level of programmer could be determined by level of stupidity of his/her bugs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top