Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Mar 2002
    Location
    North Carolina, USA
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Processing imported text? (Access 97)

    I have a text file with 3 lines per record and 109 char/line.
    I used Input() to get data from file and InStr() to jump to pertanent information within string.
    However I get an "Invalid procedure call or argument" error on the InStr() code.
    I cannot find anything about using either function that would cause this problem.
    The following is a sample and all variables are defined discreetly as appropriate.
    Any suggestions? <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

    Do While Not EOF(1) ' Loop until end of file.
    strIncoming = Input(109, #1) ' Get 109 characters.
    Debug.Print strIncoming ' Print to Debug window.
    intIndex = InStr(0, strIncoming, "CSE=", vbTextCompare)

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Processing imported text? (Access 97)

    Use :
    intIndex = InStr(1, strIncoming, "CSE=", vbTextCompare)
    Francois

  3. #3
    New Lounger
    Join Date
    Mar 2002
    Location
    North Carolina, USA
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Processing imported text? (Access 97)

    Thanks. My C backgound is comming out. <img src=/S/brickwall.gif border=0 alt=brickwall width=25 height=15>

Posting Permissions

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