it seems that the datasource is still opened after clicking the "Cancel"-button in the messagedialog. After closing the the messagedialog with the "Cancel"-button then I get t.Conditioncode = 5. So if I check the conditioncode before calling t.Aquire and t.Conditioncode = 5 I can disable and close the datasource in advance. After disabling and closing the datasource t.Aquire woks correctly and scanning is possible again. Is this the correct solution to this problem?