Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    New Jersey, USA
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    runtime 3167 (97 sr2)

    Good Morning

    I have attached code that is creating a problem for me. Basically I am deleting the contents of a table and then appending new records using a query. Then I am creating a txt file from the table.

    I am getting the error on this line
    filetxt.writeline

    When I take the two lines out that delete and recreate the table I have no problem.
    Thanks in advance

    Cathy
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: runtime 3167 (97 sr2)

    Try moving the line

    Set rst = db.OpenRecordset("CollateralAccounts", dbOpenDynaset, dbSeeChanges)

    down to immediately above the line

    With rst

    That way, the delete query and append query will already have been executed when you open the recordset.

  3. #3
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    New Jersey, USA
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: runtime 3167 (97 sr2)

    Thanks that works!!

Posting Permissions

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