Results 1 to 4 of 4

Thread: Item not found in this collection [Solved]

Threaded View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2001
    Location
    Mass USA
    Posts
    1,674

    Resolved Item not found in this collection [Solved]

    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:
    1. Public Sub UpdateIncLog()
    2. Dim tCurrentTime As Date
    3. Dim dCurrentDate As Date
    4. Dim rsIncFileLog As Recordset
    5. Dim dbsCurrent As Database
    6.  
    7. Set dbsCurrent = CurrentDb
    8. Set rsIncFileLog = dbsCurrent.Recordsets("Incoming File Log")
    9.  
    10. tCurrentTime = Time("hh:mm:ss")
    11. dCurrentDate = Date
    12.  
    13. With rsIncFileLog
    14.     .AddNew
    15.     .Fields("Filename") = stFilename
    16.     .Fields("Date") = dCurrentDate
    17.     .Fields("Time") = tCurrentTime
    18.     .Update
    19. End With
    20. End Sub
    Last edited by Besoup; Feb 10th, 2005 at 12:55 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width