Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    if you want to spit back the original header and footer you can store those temporarily in a table in access and just use the same method instead of generating the header/footer you would read it back as part of a recordset.

  2. #17
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Found an error in the import code. Delete the line in red.

    Code:
        If Len(Trim(FileToRead)) > 0 Then
            '  open read text file
            RF = FreeFile
            Open FileToRead For Input As #RF
        Else
            Close #RF   '<<<-- Delete this line
            MsgBox "No file selected. Exiting routine"
            Exit Sub
        End If
    Added Write routine.....
    Attached Files Attached Files

  3. #18
    didiomm is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Dec 2013
    Posts
    47
    Steve!

    This works great Thank you so much. And it is very clearly written where I can either understand or research to get a better idea of what the code is doing.

    And thanks to everyone else that chimed in to help

  4. #19
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Just a word of warning if you're going to use the freefile method instead of filesystemobject commands. the freefile method will not allow you to read anything other than a carriage return/line feed as an end of line, for instance if you may get files from a unix system unix only has a line feed terminator, that's why I usually stick to filesystemobject commands, they're much more flexible and allow a much wider array of commands you can manipulate your files with.

  5. #20
    didiomm is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Dec 2013
    Posts
    47
    rpear:

    Didn't know that about Unix systems. I could very well get feeds from Unix systems in the future so this is very good info. Thanks!

  6. #21
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    @rpeare
    I didn't know about the Unix system having only a line feed terminator. I don't/haven't received any text files from a Unix system, but thanks for the info. I guess I'll have to start studying the File System Object...

  7. #22
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    can you provide a sample database and a sample file with what you have so far.

  8. #23
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    wow mispost.. not sure how I did that

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Importing an updated file from Excel to DB
    By Radtastic10 in forum Access
    Replies: 2
    Last Post: 07-07-2016, 12:45 PM
  2. Replies: 8
    Last Post: 03-12-2016, 02:06 PM
  3. Importing an excel file that must be updated daily
    By apetriella in forum Import/Export Data
    Replies: 9
    Last Post: 02-21-2015, 06:23 AM
  4. importing header and body information from text (csv) file
    By JamesL in forum Import/Export Data
    Replies: 6
    Last Post: 04-10-2012, 09:47 PM
  5. Importing new time for header and update report
    By spamvalley in forum Reports
    Replies: 2
    Last Post: 02-16-2006, 11:23 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums