473,503 Members | 7,214 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Automate a Import Process/Maybe just a Refresh

72 New Member
I’d like to try and automate a import process. Below are the steps I currently use to get these excel spread sheets into my ms access database.

Manual delete tables Table1, Table2, Table3, Table4.
Open the macro to TransferSpreadsheet exel TableA
Open the macro to TransferSpreadsheet exel TableB
Open the macro to TransferSpreadsheet exel TableC
Open the macro to TransferSpreadsheet exel TableD

“All these tables have the same type of data, and field names”

Run append query to Master_Append_qty for all 4 Tables.

Is there a way I can just do a refresh. All

Can I get some advice or help automating this process

Thanks for all your help and time
TCB
Dec 28 '10 #1
1 1476
Lysander
344 Recognized Expert Contributor
You could put a button on your form, and use the On_click event to write VBA code something like this.

Expand|Select|Wrap|Line Numbers
  1. db.Execute ("DROP TABLE Table1;"), dbFailOnError
  2. db.Execute ("DROP TABLE Table2;"), dbFailOnError
  3. 'etc for all tables
  4. DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel7, "Table1", "C:\Myspreadsheet1", True
  5.  
  6. DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel7, "Table2", "C:\Myspreadsheet2", True
  7.  
  8. etc
  9.  
Dec 29 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

11
1613
by: Ville Vainio | last post by:
It might just be that @decorator might not be all that bad. When you look at code that uses it it's not that ugly after all. A lot of the furor about this is probably because it happened so...
3
2227
by: meyvn77 | last post by:
Hello, I have a monthly dump that comes to us in access format. That dump needs to be imported into sql server(Fromt end ADP) as part of the monthly update routine. The process should go something...
2
2699
by: Phil Latio | last post by:
We have despatch process which kicks out picking information into text files at hourly intervals. The text files are named sequentially by process; 'ABC.txt', 'ABC01.txt', 'ABC02.txt' for one...
0
1367
by: Jill Elaine | last post by:
I want to automate the import of 5 encrypted .db (Paradox) tables into a MS Access 2002 database every time the Access database is opened. I think I could use the TransferDatabase method to import...
16
4529
by: LP | last post by:
Hello, I am trying to use .NET with Excel. I installed Office 2003 and selected ..NET programming suport option, so it installed all those PIA, as MS sugests. But I can not find a way to destroy...
6
990
by: Sam Malone | last post by:
Am I just totally missing something here? I'm just new to VS.NET 2005 (using VB.NET) and ADO.NET. I get the impression that ADO.NET can't do what I'm used to doing with ADO (previous ADO...
3
1933
by: Simon | last post by:
Dear reader, One table in database A...mdb is linked to a table in database B..mdb. As A..mdb is open and in B...mdb starts an excel import procedure the progress bar shows that the import...
1
2221
by: jgscott3 | last post by:
Dear Access Developers: I need to automatically import a file into Access from the same directory every day. However, I need the code to search the files in the directory and only import the...
4
1186
by: Cirene | last post by:
i am creating an asp.net auction website how do i create a process that will "end" the auction when it's time obviously i don't want to sit at a browser and keep refreshing the page i'm not...
5
11782
by: NarayanaR | last post by:
Hello, I'm new to Office(!) but not to programming. I have a requirement that I'm struggling to solve: 1. In Access, I import a List from a sharepoint site as a linked table. 2. I delete all...
0
7207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7357
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7012
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5598
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5023
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4690
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3171
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1522
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.