close tables loCursor = CREATEOBJECT("CursorAdapter") WITH loCursor .Alias = 'CustomersCursor' .DataSourceType = 'Native' .DataSource = _samples+"northwind\northwind.dbc" .SelectCmd = "select CUSTOMERID , COMPANYNAME, CONTACTNAME from CUSTOMERS where .t."+chr(13) .KeyFieldList = 'CUSTOMERID' .Tables = 'CUSTOMERS' *-- will open a "query" browse on the next line .cursorFill() *-- after completion, the "query" cursor is renamed "Customercursor" as expected .cursorDetach() endwith set *-- if the cursor is left open, the error will not occur the second time this test is run use in [CustomersCursor]