Insert foreign key



hi,
I am trying to insert data into an MSAccess table through a datagrid. I did
it by creating a custom Insert Command.
However, the table has a foreignKey,which obviously is hidden to the user
(mappingType.hidden) but i tried to pouplate this foreignkey using the code
below, before
running update

//// code in Update_Click button
If ds.HasChanges Then
Dim dt As DataTable = ds.Tables("codegrid").GetChanges(DataRowState.Added)
dt.Rows(0)("filenamefk") = 1 'assume only one row is added and fk =1
End If
///
da.update(ds,tbl)

I can see the table updated in Access but not the fileNamefk.
Is it the correct way to include the data that is not been inserted via
datagrid, but needs to be in table.
Is there any other way to do this.

TIA
Irfan




.