variable file name with transfertext

moorsey

Registered User.
Local time
Today, 10:43
Joined
Dec 28, 2005
Messages
49
Looks like this might be the one that brings me into VBA

Ive got my import spec all set up, importing a text file running querys on it e.t.c. But, as soon as this DB is moved to another computer, the file name is going to be different, so for fuller automation, I need some way of bringing up a "browse" box telling the user to select the .txt file they wish to import into the DB. I am using a macro so I am guessing I will have to use some sort of function to do this?

Thanks folks
 
Have a look at the attached database previously posted by GHudson
 

Attachments

Didnt come across that before, thanks

Had a look through, alot to get my head round and im afraid I don't understand most of it, maybe it looks more complex than it is, would I need all of the code on the import form to just browse for a file, it looks like theres other stuff going on in the event procedure of that import button.

Would I have to scrap the Macro if I used this, or can I point the file path of the transfertext to the result of the browse form
 
Yep, time to step up to the plate and learn VBA.

Just walk through the code in my browsing sample for it is not that hard to determine what each line is doing. You can easily import [copy and paste] the parts of my sample into your db and then make the adjustments to meet your needs. Here is the original link...
Browse [Find a directory or file]

Searching the forum is a great way to discover and learn the answers to your Access programming questions.
 

Users who are viewing this thread

Back
Top Bottom