>IF thisform.actNewType.Caption = "Cancel Add Tool Type"
> IF EMPTY(thisform.txtDescription.Value)
> MESSAGEBOX("Please provide a Description")
> thisform.txtDescription.SetFocus
> RETURN
> ENDIF
>
> thisform.txtDescription.Visible = .F.
> thisform.chkHasFeedback.Visible = .F.
> thisform.chkNeedsMaint.Visible = .F.
> thisform.chkHasFeedback.Visible = .F.
> thisform.chkNeedsSN.Visible = .F.
>
> INSERT INTO (thisform.grdToolType.recordsource);
> (description,needsSerialNo,needsMaintenance,hasFeedback,isActive);
> VALUES;
> (thisform.txtDescription.value, thisform.chkNeedsSN.value, thisform.chkNeedsMaint.value,
> thisform.chkHasFeedback.value,1)
>ENDIF
>
>thisform.LockScreen = .T.
>thisform.actNewType.Caption = "Add New Tool Type"
>
>SELECT (thisform.grdToolType.recordsource)
>lcFilter = SET("FILTER")
>SET FILTER TO
>
>thisform.oDataClass.update_remote_table("mech_pib","crsToolType","tool_type","idtool_type")
>thisform.oDataClass.get_table("mech_pib","tool_type","crsTemp")
>
>SELECT (thisform.grdToolType.recordsource)
>ZAP
>APPEND FROM DBF('crsTemp')
>SET FILTER TO &lcFilter
>GO TOP
>
>thisform.grdToolType.refresh
>
>MESSAGEBOX("Data has been saved")
>
>thisform.LockScreen = .F.
>
>At this point there are no records displayed in the grid. The cursor has the expected number of records. If I press a navigation button the grid displays the correct recordset. I put a KEYBOARD command at the end of the method and it's working but I would appreciate an explanation as to why I need to do that.
>
>The cursor is created by an SQLEXEC and the buffering is whatever the default would be for that (I think 3).
>
>Thanks to all.................Rich
Try putting lockscreen =.f. before append and also don't apply filter yet - see if the problem will be removed.
If it's not broken, fix it until it is.
My Blog