I’m getting a - Error 91: Object variable not set - error when I try to assign a value to the first field after I issue the AddNew method. The iYear does have a good value.
strDQ = chr(34)
strRptNumSel = "SELECT * FROM " & strDQ & "ReportNum" & strDQ
set myRecSetRptNum = Application.CurrentDb().OpenRecordset(strRptNumSel,,,)
With myRecSetRptNum
.AddNew
.Fields("Year") = iYear 'integer - error occurs on this line
.Fields("Rnum") = iRptNum 'integer
.Fields("REID") = iRptEID.value 'variant
.Update
End With