USE (.cTable) IN 0 EXCLUSIVE && Opens both ORDERS and Customers tables. SELECT (.cTable) && LV_ORDERS * Create indexes for Local View, LV_ORDERS. INDEX ON Lic_Plate TAG Lic_Plate INDEX ON ALLTRIM(LASTNAME)+ALLTRIM(FIRSTNAME) TAG LFNAME INDEX ON VIN TAG VIN INDEX ON ORDER_NO TAG ORDER_NO SET ORDER TO LFNAME * Set the buffering to Optimistic buffering. SET MULTILOCKS ON CURSORSETPROP("Buffering", 5, "lv_Orders") && Changes are only made to the ORDERS table. * Open other tables, which are used for DropDown Lists. USE States IN 0 SHARED USE Warranty IN 0 ORDER Warranty SHARED>>
LPARAMETERS tcTable LOCAL llGoodSave WITH ThisForm llGoodSave = TABLEUPDATE(0,.T., tcTable) IF !llGoodSave WAIT WINDOW NOWAIT "Was not able to save changes." ELSE .newButton.Enabled = .T. && Turn New button back on now that data has been saved. *.cmdLetter.Enabled = .T. && Turn Letter button back on,... .printButton.Enabled = .T. && Turn Print button back on,... .saveButton.Enabled = .F. .cancelButton.Enabled = .F. WAIT WINDOW NOWAIT "Save was successful!" ENDIF ENDWITH RETURN llGoodSave>This problem may happen if the table is buffered as well (the Orders table).