*:BeforeOpentables event in DataEnvironment IF lUseCursor = .T. && I want use cursor *:Change the alias of your table in the dataenvironment first This.Cursor1.Alias = TableToSwitch1 *:Now ahving the alias name free to use again then do your select into cursor <alias> SELECT * FROM ... WHERE ... INTO CURSOR TableToSwitch READWRITE && or table ENDIFin your code you make reference to the table through the alias name so when your program say something like :
replace field1 with lcwhatever in TableToSwitchthe cnahges will be made wether in te cursor or the table dependin on your variable
DO WHILE .T. ME.Work() ENDDO