This may be something trivial but I really can’t get it to work, I get an error that says “Argument not optional”.
Here is my code, essentially the code is trying to add the data that is located within the form and some other data such as current user and date.
Private Sub listResult_DblClick(Cancel As Integer)
Dim sc1 As DAO.Recordset
Set sc1 = CurrentDb.OpenRecordset.Value("Stock Conversion", dbOpenDynaset)
sc1.AddNew
sc1.Fields("[SC Date]").Value = VBA.DateTime.Date
sc1.Fields("[Created By]").Value = Application.CurrentUser
sc1.Fields("[Product Code]").Value = Me.listResult.Column(0)
sc1.Fields("[Status]").Value = "NEW"
sc1.Update
End Sub
Thanks in advance,
Bob P
You have added Value to Openrecordset. You should not: