Marc - It's not discussed in the material too much b/c it's more of a ""post-intermediate"" class concept to discuss ProvideX commands that can be executed with script. One of the later scripts does this after getting the control ID of the field:
oScript.Execute(""MULTI_LINE GOTO tmpDestCtl"")
However that doesn't apply to grids. It would be something like this but I have NOT tested this. I would put this logic before the SetError() since anything after that may not execute:
If QtyOrd =0 and sItemType = ""1"" Then
Set oUIObj = oSession.AsObject(oScript.UIObj)
oUIObj.GetControlProperty ""GD_LINES"", ""Row"", RowNo
oUIObj.GetControlProperty ""GD_LINES"", ""Column$"", ""QuantityOrdered""
oUIObj.GetControlProperty ""GD_LINES"", ""Column"", ColNo
oScript.Execute(""tmpRow = "" & RowNo)
oScript.Execute(""tmpColumn = "" & ColNo)
oScript.Execute(""GRID GOTO GD_Lines.ctl, tmpColumn, tmpRow"")
'SetError
Better thought is highlight the cell in the grid instead of setting focus. This I haven't tested either but should work. But if you do this, you may also need a post-write script that sets the Backcolour (use the Queen's English) back to DEFAULT a.k.a. LIGHT GRAY if QtyOrd<>0 and possibly refresh the grid too.
If QtyOrd =0 and sItemType = ""1"" Then
Set oUIObj = oSession.AsObject(oScript.UIObj)
oUIObj.GetControlProperty ""GD_LINES"", ""Row"", RowNo
oUIObj.SetControlProperty ""GD_LINES"", ""Row"", CStr(RowNo)
oUIObj.SetControlProperty ""GD_LINES"", ""Column$"", ""QuantityOrdered""
oUIObj.SetControlProperty ""GD_LINES"", ""Backcolour"", ""LIGHT YELLOW""
'SetError