Results 1 to 2 of 2
  1. #1
    mudcat is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    1

    [Newbie Question] Input past end of file (Error 62)

    Edit: I've been working on an XP virtual machine (32bit) running Access 2003 when messing with this.



    I'm currently working with a database that's been in use for years to upload excel data into appropriate tables in an access database. However, recently, I've started getting an "input past the end of file" error and I haven't had any luck fixing it. I'm not a coder and the person who designed this database left ages ago. I don't really have anyone I can ask, so I turn to you lovely internet people!

    The bit of code that I believe is the culprit:

    Code:
    Private Function Get_PIDN_From_EyeTrack(FileIn As String, ByRef PIDN As Integer, ByRef TableName As String)
    
    Dim lineX As Integer
    Dim mytext As String
    Dim Tab1 As Integer
    Dim Tab2 As Integer
    
    Open FileIn For Input As #1
    lineX = 1
    
    Line Input #1, garbage
    Line Input #1, mytext
    
    Tab1 = InStr(1, mytext, Chr(vbKeyTab))
    Tab2 = InStr(Tab1 + 1, mytext, Chr(vbKeyTab))
    
    PIDN = Mid(mytext, 1, Tab1 - 1)
    TableName = Mid(mytext, Tab1 + 1, Tab2 - (Tab1 + 1))
    
    Close #1
    
    End Function
    I tried adding a "Do While Not EOF(1)" before Line Input, and a "Loop" before Close #1 but got the same error. This is the only Function in all of the code that uses the word "Input".

    I'm guessing that I'll likely have to post all of the code in this database, or just attach a copy of the database itself (there's no identifying information in it, and it's only about 10Mb) to make proper sense of everything...along with a sample upload file.

    Side question: is "garbage" a command? Or just the guy who wrote this being lazy and defining things as "garbage"?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    How did you determine the error is in this function? Have you steb debugged? Review the link at bottom of my post for guidelines on debugging techniques.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. newbie question
    By hannuk in forum Access
    Replies: 1
    Last Post: 12-12-2011, 07:18 AM
  2. Newbie question
    By Patience in forum Queries
    Replies: 4
    Last Post: 11-24-2010, 02:18 AM
  3. Newbie input mask Q and paswords setting
    By Cincity in forum Programming
    Replies: 2
    Last Post: 08-01-2010, 12:42 AM
  4. Newbie question
    By webby in forum Access
    Replies: 6
    Last Post: 07-19-2010, 06:22 AM
  5. Newbie seeking input
    By Bruzer in forum Access
    Replies: 1
    Last Post: 04-07-2010, 09:03 AM

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