Microsoft Access Forums

Go Back   Microsoft Access Forums > Access Forums > Programming

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 08-30-2006, 05:30 AM
Novice
 
Join Date: Aug 2006
Posts: 1
smdesq13
Default Desperately need code to automate Access 2003 from Word 2003

I have a Word document that is filled with data. I set up a button on the document where the user is supposed to click on the button and run VBA code. The code is supposed to open an access database and run a select query and then insert new data into the access database. The database is in the same directory as the document. I am limited to starting it from Word with the button. The button works and runs the VBA. I just don't know what to use to get the database open and queried. Help would be greatly appreciated. thanks.
Reply With Quote
  #2  
Old 09-06-2006, 09:48 AM
Novice
 
Join Date: Dec 2005
Posts: 17
rayc
Default

The solution is not trivial unfortunately.

What I would do is add a reference to the Microsoft Access Object Library within your VBA code in Word, and then open an instance of Microsoft Access, then use commands such as OpenDatabase(), etc. to do your stuff. From there, you would populate tables, run queries, etc.

Hope this gives you some direction.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access 2003 could not update; currenty locked. WHEELS Queries 0 11-10-2008 09:35 AM
Microsoft Access 2003-Missing Records?? kristenlee Access 1 04-04-2008 04:43 PM
access 2003 automation issue BevA Programming 2 05-01-2006 06:37 AM
Report preview zoom problem with Access 2003 neil Reports 1 04-05-2006 11:58 AM
Help! Newbie needs help with Access 2003!!! infernojericho Access 0 12-03-2005 05:11 PM


All times are GMT -8. The time now is 02:58 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.