open saved import external data vba code (1 Viewer)

Using a graphical interface for manual selection interrupts automated programmed processes.
I guess you don't understand the concept of the spec and how it is used. The graphical interface is only used ONCE to define the spec. After that, the import/export can be automated AND the same spec can be used for both import and export so having a graphical interface interferes with nothing. It is simply used to create the process initially.
 
Using a graphical interface for manual selection interrupts automated programmed processes.
It, like isladogs much more sleek and professional apps, is a simple design and development aid, and nothing to do with the operation of a database in use.

I built it for fun years back (probably in Access 2000) when I was still working and I've been retired for 15 years: it has proven very useful over the years. It was more of an exercise of learning how specs work: there is nothing particularly clever about it and that's why I'll make it available for people to play with, hack, destroy, criticise as they wish.
 
I guess you don't understand the concept of the spec and how it is used.
Your conclusion is wrong. Of course, if text files always have the same structure, a specification only needs to be created once and then it will remain the same. This is the standard case, which is what we always aim for - with the emphasis on text files with the same structure.

However, text file suppliers often do not adhere to standards, but rather express their own "creativity".
=> third paragraph
Here I decided that a continuous adjustment of the import specification and then the simple mass import is cheaper than a VBA construct with loops over individual values.
As I said, working in a standardized way is easy and preferable for good reasons, but the world is now more diverse. It's nice when one can find relatively easy ways to respond to the differences.
 
Attached as promised is the utility I created in the mists of time.

This utility is offered 'AS IS' and is used at your own risk.

It is NOT of production quality and has some(lots of) rough edges. Especially it will fail if you try and assign anything to a column if there is no current Spec!

There is no dedicated support!

The content of the zip file is:

Specs.accdb - my development container and needs a spec created (and data tables added) to practice with.

2 x Word templates (ImportSpecificationFixed,dotm and ImportSpecificationDelim.dotm) for printing out the content of Fixed of delimited specs. The code as written in the module USys_BasIMEXDoc expects these to be in the same directory at the database.

3 x modules - basBits.acm, basConfiguration.acm, USys_basIMEX.acm and 2 x forms USys_fsubIMEXColumns.acf, USys_frmIMEXSpecification.acf which are for import to a database using the LoadFromText process, if you prefer this to importing them from the Specs.accdb. t also means you can inspect the constituents of the utility with a text editor offline before you use them in a database.

You are welcome to do what you wish with all or any of the content.
 

Attachments

Users who are viewing this thread

Back
Top Bottom