• Import code (Access 97)

    Author
    Topic
    #379382

    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

    Viewing 2 reply threads
    Author
    Replies
    • #631560

      Do you wish to import data to a table in VBA code behind a form?
      Pat cheers

      • #631882

        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.

    • #631630

      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?

    • #631665

      If you want to use the standard File Open dialog box, take a look at (for instance) post 188202. 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.

    Viewing 2 reply threads
    Reply To: Import code (Access 97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: