Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default How do I, in a marco VBA, code to take data from excel and append it to Access?

I would like to appended my excel data to a access database table. I
can manualy do this but I need to programmatly do it. I also must
avoid the message "you are about to append ??? records".
Thanks for your help.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default How do I, in a marco VBA, code to take data from excel and append it to Access?

Pete:

One alternative is to use the QueryDef class of DAO. For example:

Function RunAppendQuery()
Dim qdf As QueryDef

Set qdf = CurrentDb.QueryDefs("MyAppendQuery")
qdf.Execute

Set qdf = Nothing

End Function

The example assumes that you have saved your append query in Access and that
you have linked your Excel workbook into Access. You could tie this
function to the click event of a command button, for instance. You will
need a reference to the Microsoft DAO library, of course.

Information on creating an Append query can be found in the following KB
article (if needed).

http://support.microsoft.com/default...b;en-us;306093


--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


"Pete" wrote in message
oups.com...
I would like to appended my excel data to a access database table. I
can manualy do this but I need to programmatly do it. I also must
avoid the message "you are about to append ??? records".
Thanks for your help.


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
How do I Append excel data to a Access database table in a excel macro? Pete[_24_] Excel Programming 1 November 2nd 05 06:40 PM
use vba in excel to append data in access sakijung[_2_] Excel Programming 0 April 7th 04 07:16 AM
Append Data In Worksheet To Access Table Martin[_14_] Excel Programming 4 December 3rd 03 11:52 AM
Append Data To Access Table Martin[_14_] Excel Programming 3 December 3rd 03 08:33 AM
Excel's Marco Convert data to Access Paul Excel Programming 1 August 15th 03 10:06 PM


All times are GMT +1. The time now is 09:27 AM.

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

About Us

"It's about Microsoft Excel"