Results 1 to 4 of 4

Thread: text File

  1. #1
    Join Date
    Sep 2003
    Posts
    2

    Unanswered: text File

    How do I write to a text file with no carriage returns??
    I have Tried :

    Replace("fieldname", vbCRLf,"")
    Replace("fieldname",char(13) & char(10),"")


    Both of them don't work

  2. #2
    Join Date
    Feb 2002
    Location
    San Francisco, CA
    Posts
    441
    remove the quotes from around fieldname

  3. #3
    Join Date
    Sep 2003
    Posts
    2
    Originally posted by rhs98
    remove the quotes from around fieldname
    I tried that and it did not work

    Here is the code:

    Private Sub Command41_Click()
    Open "c:\text.txt" For Append As #1



    Write #1, Replace(Me.UCC, vbCrLf, "")




    Close #1
    End Sub

  4. #4
    Join Date
    Jun 2003
    Location
    USA
    Posts
    1,032
    Don't know if this hopefully might help somehow:

    FileSystemObject
    http://www.4guysfromrolla.com/webtec...leSystemObject

    The Wonders of the File System Object by Chris Payne - 8/16/2000
    http://www.15seconds.com/Issue/000816.htm
    J. Paul Schmidt, Freelance Web and Database Developer
    www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips

Posting Permissions

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