Hello I am kinda new at this stuff and I am trying to add a new record into a table within my access DB and the data is coming from a few variables I made. The following code is what I am using but when I am assigning the table to as a record set I get the error message in the subject. Here is my code:
VB Code:
Public Sub UpdateIncLog() Dim tCurrentTime As Date Dim dCurrentDate As Date Dim rsIncFileLog As Recordset Dim dbsCurrent As Database Set dbsCurrent = CurrentDb Set rsIncFileLog = dbsCurrent.Recordsets("Incoming File Log") tCurrentTime = Time("hh:mm:ss") dCurrentDate = Date With rsIncFileLog .AddNew .Fields("Filename") = stFilename .Fields("Date") = dCurrentDate .Fields("Time") = tCurrentTime .Update End With End Sub




Reply With Quote