Importing table from CSV (1 Viewer)

Etxezarreta

Member
Local time
Today, 01:12
Joined
Apr 13, 2020
Messages
175
Hello everyone,
I have been facing the same problem: and I am a bit ashamed to say that I am not sure about the solution you all try to make us understand.

=> Let say the DB we use (queries, records etc..) is named Main_DB. It is in Folder_Main_DB
- The CSV file is called File_CSV. It is in Folder_CSV
- The master Access is called MasterCopy_DB: it is in Folder_MasterCopy_DB
- The slave Access is called SlaveCopy_DB: it is in Folder_SlaveCopy_DB
=>Questions:
- You create a table in MasterCopy_DB linked to File_CSV correct?
- Then with VBA code you give the order from Main_DB to create a copy of MasterCopy_DB in Folder_SlaveCopy_DB, called SlaveCopy_DB?
- Then in SlaveCopy_DB, I check whatever I need to still from Main_DB
- If it is ok, I transfer the data from SlaveCopy_DB to Main_DB ?
- Then I get rid of SlaveCopy_DB , still from Main_DB?

Sorry if I make you repeat all over again, I really need to be sure of the correct process.
Thanks again.

Etxe.
Sorry for the delay. I had started a sample db for this function a while back so I finished it and added instructions. It is a little more complicated than it actually needs to be but it is also more flexible and includes some other features you might find useful. See how it works for you.
Thank you very much, this is an extremely useful work.

Etxe.
 

Gasman

Enthusiastic Amateur
Local time
Today, 00:12
Joined
Sep 21, 2011
Messages
14,265
No.
Let's try another way.
DB A is your main DB, your FrontEnd or if not split the actual DB in use.
DB C is effectively a temporary DB that you link to from DB A. I am calling it DB C as DB B is a 'master template version' that holds the structure needed for any csv files, but is always empty. It is NEVER directly used for data, but copied from each time and overwrites DB C, so you ALWAYS start with an empty correctly structured DB. As your DB A is always linked to DB C, no change of linkages is required.
As you copy the empty master each time, you never get any bloat, which is the whole reason for this process.

So A is your DB, B is the master import template DB, and C is the DB that you refer to after importing any csv files.

Any clearer now?
 

Etxezarreta

Member
Local time
Today, 01:12
Joined
Apr 13, 2020
Messages
175
No.
Let's try another way.
DB A is your main DB, your FrontEnd or if not split the actual DB in use.
DB C is effectively a temporary DB that you link to from DB A. I am calling it DB C as DB B is a 'master template version' that holds the structure needed for any csv files, but is always empty. It is NEVER directly used for data, but copied from each time and overwrites DB C, so you ALWAYS start with an empty correctly structured DB. As your DB A is always linked to DB C, no change of linkages is required.
As you copy the empty master each time, you never get any bloat, which is the whole reason for this process.

So A is your DB, B is the master import template DB, and C is the DB that you refer to after importing any csv files.

Any clearer now?
This is champagne (good champagne) clear Gasman, thanks a lot.
Etxe.
 

Users who are viewing this thread

Top Bottom