D
dhstein
I'm trying to update the field in a table from by reading in a text file.
The code is below
Dim rs As DAO.Recordset
Dim rsProducts As DAO.Recordset
Set rsProducts = CurrentDb.OpenRecordset("tblProduct")
rsProducts.Index = "ProductSKU"
..
.. Other Code here
..
Set rs = CurrentDb.OpenRecordset("Set_Product_Table", dbOpenSnapshot)
rsProducts.Seek "=", ![ProductSKU]
If rsProducts.NoMatch Then
MsgBox "This is a new item"
MsgBox ![ProductSKU]
With rsProducts
.AddNew
'?????????????????????????????????
' What code here sets the ProductSKU field for the new
record
'in the products table to the value
' of ProductSKU that is displayed in the MsgBox above?
' ???????????????????????????????
.Update
End With
Thanks for any help on this.
The code is below
Dim rs As DAO.Recordset
Dim rsProducts As DAO.Recordset
Set rsProducts = CurrentDb.OpenRecordset("tblProduct")
rsProducts.Index = "ProductSKU"
..
.. Other Code here
..
Set rs = CurrentDb.OpenRecordset("Set_Product_Table", dbOpenSnapshot)
rsProducts.Seek "=", ![ProductSKU]
If rsProducts.NoMatch Then
MsgBox "This is a new item"
MsgBox ![ProductSKU]
With rsProducts
.AddNew
'?????????????????????????????????
' What code here sets the ProductSKU field for the new
record
'in the products table to the value
' of ProductSKU that is displayed in the MsgBox above?
' ???????????????????????????????
.Update
End With
Thanks for any help on this.