Results 1 to 3 of 3
  1. #1
    juliet is offline Novice
    Windows Vista Access 2003
    Join Date
    Sep 2011
    Posts
    2

    Transfering textbox string to import filename

    I would be very grateful for any help anyone can give me. I am really struggling to make it work.
    I have a textbox with a filename in it on a form and when I click abutton I want to transfer the file name to an import statement and import the file.
    However I am unable to assign the sting in the textbox to a variable.

    What I have been doing is
    public filename as string
    filename = [Forms]![run query]![TexT_startdate]


    DoCmd.TransferDatabase acImport, "dBase IV", "p:\infdata\foxpro\" & filename & ", acTable, "", , False"

    When I try and assign the string to a variable (the part in red) i get the error message:
    object or class does not support the set of events

    Any help would be wonderful. Many thanks, Juliet

  2. #2
    juliet is offline Novice
    Windows Vista Access 2003
    Join Date
    Sep 2011
    Posts
    2
    I'm not sure if this is the right place to put this thread - as I have had no replies I can only assume it is not. If you know where I should so that I can get some help please say

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Is this code being executed on the [run query] form?

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

Similar Threads

  1. Replies: 3
    Last Post: 06-02-2011, 02:08 PM
  2. Replies: 7
    Last Post: 02-23-2011, 06:26 PM
  3. Replies: 5
    Last Post: 10-19-2010, 09:10 AM
  4. Prompt for filename for import/export??
    By stephenaa5 in forum Import/Export Data
    Replies: 23
    Last Post: 10-23-2009, 03:43 PM
  5. Import XML String into Access table
    By chrisjohns in forum Programming
    Replies: 0
    Last Post: 04-16-2009, 01:47 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