D
dhstein
I'm trying to update a table from data that I read from a linked text file.
I'm having problems with it, and maybe it would help if I understood what the
"!" is for and the "Me." I have two recordsets open and that is confusing
either me or confusing Access - probably me. I'll repeat my code here in
case you haven't seen it in the other posts. Thanks.
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 in the
products table
' to the value of ProductSKU that is displayed in the
MsgBox above?
' ???????????????????????????????
.Update
End With
I'm having problems with it, and maybe it would help if I understood what the
"!" is for and the "Me." I have two recordsets open and that is confusing
either me or confusing Access - probably me. I'll repeat my code here in
case you haven't seen it in the other posts. Thanks.
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 in the
products table
' to the value of ProductSKU that is displayed in the
MsgBox above?
' ???????????????????????????????
.Update
End With