Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2005
    Location
    England.
    Posts
    232

    Unanswered: Write# Command problem. Now solved

    OK, here's what I'd like to do. I want to generate an error handler for a button on a form. As it stands I can't get a DoCmd.RunSQL command to work, to write it to a table, so now I'm looking at Write#.

    OK, here's the code ...

    Open "C:\Error Log.txt" For Output As #1

    Write #1, "Error occured at " & Now()
    Write #1, "Error with Exec Summary, " Err.Description
    Write #1,

    Close #1

    Now what I'd like to do is concatenate errors, so that the files grows in size and never over-writes data. The reason for this is multiple queries run for over night processes and I need to know if there are any errors on any of them.

    Right now the Write over-writes the errors before.

    Any ideas to help please?

    Thanks in advance.
    Last edited by daveo61; 02-04-05 at 07:51.

  2. #2
    Join Date
    Feb 2005
    Location
    England.
    Posts
    232
    Sorry have just seen why this didn't work.

    Should use the Open with an append rather than an output.

    Sorry!

Posting Permissions

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