firoz.raj -3 Posting Pro in Training

I want if user click on save button all productname,item_code, and unit of MSHFLEXGRID name as grd in my project should be store in MS access MR Table .

i have wriiten a code in a procedure like :

If DataPath = "" Then Exit Sub
End If
Dim con As ADODB.Connection
Set con = New ADODB.Connection
con.CursorLocation = adUseClient
con.ConnectionString = "Provider=Microsoft.Jet.Oledb.4.0;Data Source=" & DataPath
Dim rs As ADODB.Recordset
Dim productname, item_code, unit, strSql, GetConnString As String
Set rs = New ADODB.Recordset
strSql = "Select * from MR"
rs.Open strSql, con, adOpenDynamic, adLockOptimistic
strSql = "INSERT INTO MR "
strSql = strSql & "(item_code,productname,unit)"
strSql = strSql & "VALUES ("
With Grd
strSql = strSql & "'" & .TextMatrix(.Row, 1) & "',"
strSql = strSql & "'" & .TextMatrix(.Row, 2) & "',"
strSql = strSql & "'" & .TextMatrix(.Row, 3) & "',"
End With
con.Open GetConnString
con.Execute GetConnString
Set con = Nothing
End Sub

But it is not working kindly help me.