Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default vb code to export data into existing Access table

HELP!

Can anyone help me out with code that will export data
from Excel into an Access Table that areadly exists? The
Excel data and Access data are identical in terms of
fields and properties. THANKS!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default vb code to export data into existing Access table



----- desperate wrote: ----

HELP

Can anyone help me out with code that will export data
from Excel into an Access Table that areadly exists? The
Excel data and Access data are identical in terms of
fields and properties. THANKS

Can you import the excel spreadsheet into Access instead of exporting from excel
You can write the same vba code in access as in excel I thought so here is th
command to import a spreadsheet into an access table.

lsSheet2 = "\\n0qcpfs1\redirect$\ndmlj1\MyDocuments\AIS.x ls
DoCmd.TransferSpreadsheet acImport, 8, "T - AISBuyer", lsSheet2, Tru

The 8 is the default in Access2000 for a spreadsheet created in at least Excel v8
If you want to export I would suppose you'd have to open the access database from th
excel vba and then use acExport

I hope this at least gets you thinkin'. Hope it helps.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default vb code to export data into existing Access table

Take a look at Mr. Erlandsen's site:

http://www.erlandsendata.no/english/vba/adodao/

--
Regards,
Tom Ogilvy

"MJ in Boston" wrote in message
...


----- desperate wrote: -----

HELP!

Can anyone help me out with code that will export data
from Excel into an Access Table that areadly exists? The
Excel data and Access data are identical in terms of
fields and properties. THANKS!

Can you import the excel spreadsheet into Access instead of exporting from

excel?
You can write the same vba code in access as in excel I thought so here is

the
command to import a spreadsheet into an access table.

lsSheet2 = "\\n0qcpfs1\redirect$\ndmlj1\MyDocuments\AIS.x ls"
DoCmd.TransferSpreadsheet acImport, 8, "T - AISBuyer", lsSheet2, True

The 8 is the default in Access2000 for a spreadsheet created in at least

Excel v8.
If you want to export I would suppose you'd have to open the access

database from the
excel vba and then use acExport?

I hope this at least gets you thinkin'. Hope it helps.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you export a pivot table into Access? Tracy Excel Discussion (Misc queries) 3 June 27th 07 12:41 AM
Is there any way to export a .xls table to Access .mdb without Acc Mr. Analogy Excel Discussion (Misc queries) 0 February 1st 07 12:05 AM
How to convert existing Excel List into a table in Access? anna New Users to Excel 2 June 18th 06 11:57 PM
Transfer to an existing Access Table Secret Squirrel Excel Discussion (Misc queries) 0 March 17th 06 11:31 PM
Export Data to Access Table Pete T[_2_] Excel Programming 1 October 10th 03 11:47 PM


All times are GMT +1. The time now is 10:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"