I have used this and double checked my work and it isn't working for
me! uggh!

what am i doing wrong?
the error i get is : 'Form1.MyDataGrid__ctl6_TxtDiscPct' is null or
not an object.

i am using frames, does that matter at all? thx for any help.

Here is my code:

Sub MyDataGrid_Edit(ByVal s As Object, ByVal e As
MyDataGrid.EditItemIndex = e.Item.ItemIndex

Dim ds As DataSet
ds = CType(Session("GlobalDataGrid"), DataSet)
MyDataGrid.DataSource = ds

Dim tb As TextBox
tb = MyDataGrid.Items(e.Item.ItemIndex).Cells(3).FindCo ntrol

RegisterStartupScript("focus", "<script
language=""JavaScript"">" & vbCrLf & _
vbTab & "Form1." & tb.ClientID & ".focus();" & _
vbCrLf & vbTab & "Form1." & tb.ClientID & ".select();" &
vbCrLf & "<" & "/script>")