Cannot access the selected table (Error 1152)
By Sergey - Posted on March 26th, 2008
The error is related to the RowSource or ControlSource of a ListBox/ComboBox.
Possible sources of this error:
- The RowSource cursor for ListBox/ComboBox has been closed or recreated in another work area. It seems that a ListBox/ComboBox remembers connection with its RowSource by workarea number not by alias. Setting ListBox/ComboBox RowSource to an empty string before query is run and restoring after would help.
- The RowSource of the multiple Combo/ListBoxes are SQL's which create cursor with the same name. Making cursor name unique fixes the problem.
- The ControlSource table/cursor of an object is closed before the object is destroyed. Move the code that closes the table/cursor into Destroy method.
- Typo in the ControlSource or RowSource of a control.
Recent comments
11 hours 12 min ago
1 week 23 hours ago
4 weeks 14 hours ago
5 weeks 5 hours ago
5 weeks 5 hours ago
7 weeks 4 days ago
8 weeks 1 day ago
8 weeks 1 day ago
8 weeks 4 days ago
8 weeks 4 days ago