B
Bill Parker
H All,
I am having a problem appending a new record to a table from a filtered
recordset. The recordset is filtered from a large table we'll call
"tblPrime". I want to append to a table called "tblRetrievalVest". The
error message I get is "Method or Data Member Not Found", and the
"rsPRT.fieldname " is highlighted. Here is the code I've been using:
If Me.FilterOn = True And Forms!DelOption!rbPRTVL = -1 Then
Dim rsPRT As DAO.Recordset
Dim rsDEST As DAO.Recordset
Dim dbs As DAO.Database
Set dbs = CurrentDb
Set rsPRT = Me.Recordset
Set rsDEST = dbs.OpenRecordset("tblRetrievalVest")
Do Until rsPRT.EOF
rsDEST.AddNew
rsDEST.DOB = rsPRT.DOB
rsDEST.[Exam Year] = rsPRT.[Exam Year]
rsDEST.Notes = rsPRT.Notes
rsDEST.[Job#] = rsPRT.[Job#]
rsDEST.[Box#] = rsPRT.[Box#]
rsDEST.[Rec Pos] = rsPRT.[Rec Pos]
rsDEST.[Volume#] = rsPRT.[Volume#]
rsDEST.Name = rsPRT.Name
rsDEST.MRN = rsPRT.MRN
rsDEST.Accession = rsPRT.Accession
rsDEST.Update
rsPRT.MoveNext
End If
Thanks for your help!
I am having a problem appending a new record to a table from a filtered
recordset. The recordset is filtered from a large table we'll call
"tblPrime". I want to append to a table called "tblRetrievalVest". The
error message I get is "Method or Data Member Not Found", and the
"rsPRT.fieldname " is highlighted. Here is the code I've been using:
If Me.FilterOn = True And Forms!DelOption!rbPRTVL = -1 Then
Dim rsPRT As DAO.Recordset
Dim rsDEST As DAO.Recordset
Dim dbs As DAO.Database
Set dbs = CurrentDb
Set rsPRT = Me.Recordset
Set rsDEST = dbs.OpenRecordset("tblRetrievalVest")
Do Until rsPRT.EOF
rsDEST.AddNew
rsDEST.DOB = rsPRT.DOB
rsDEST.[Exam Year] = rsPRT.[Exam Year]
rsDEST.Notes = rsPRT.Notes
rsDEST.[Job#] = rsPRT.[Job#]
rsDEST.[Box#] = rsPRT.[Box#]
rsDEST.[Rec Pos] = rsPRT.[Rec Pos]
rsDEST.[Volume#] = rsPRT.[Volume#]
rsDEST.Name = rsPRT.Name
rsDEST.MRN = rsPRT.MRN
rsDEST.Accession = rsPRT.Accession
rsDEST.Update
rsPRT.MoveNext
End If
Thanks for your help!