Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Import code (Access 97)

    looking for some code which I can use an input box to designate a txt file location, to input the data into a new table. Thanks

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Import code (Access 97)

    Do you wish to import data to a table in VBA code behind a form?
    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Import code (Access 97)

    You can certainly use an inputbox to allow the user to type in a path, but what data are you trying to put into a new table? And are you trying to use a file open dialog like Windows uses or just an inputbox?
    Charlotte

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Import code (Access 97)

    If you want to use the standard File Open dialog box, take a look at (for instance) <post#=188202>post 188202</post#>. The code given there lets the user browse for a file and returns the path and file name of the selected file. You can then use this in the FileName argument of DoCmd.TransferText to import the text file.

  5. #5
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Import code (Access 97)

    I think your on the right track Patt. I really need to import an .HTM file into a table in access. I thought I could use a dialog or input box to select the file.

Posting Permissions

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